1792 Posts in 588 Topics by 560 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 492 Views |
-
Url action and Form actions

14 April 2011 at 11:26am
Hello,
i try to execute a form by
localhost/waytomyform/add/1
public function add($request) {
$myID = $request->param('ID');
$fields = new FieldSet(
new TextField('Name', 'Name'),
new DropdownField(
$name = "Student",
$title = "Student",
$source = Student::getStudentDropDown(),
$value = $myID
));
$form = new Form($this, "add",
$fields,
new FieldSet(new FormAction('doAdd', 'Submit'))
);return array(
'Title' => "Add Title",
'addForm' => $form,
);
}this far everything is ok
but the function doAdd never get executed
i addedpublic static $allowed_actions = array (
'doAdd',
}A form not started by urlaction could call doAdd
any Idea
Thanks
| 492 Views | ||
|
Page:
1
|
Go to Top |

