Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

set form method to POST


Reply


3 Posts   1264 Views

Avatar
snaip

Community Member, 180 Posts

9 March 2011 at 1:31am

how ??

Avatar
Willr

Forum Moderator, 5513 Posts

9 March 2011 at 9:46pm

It's POST by default. If you want to change the type $form->setFormMethod('POST');

http://api.silverstripe.org/2.4/forms/core/Form.html#methodsetFormMethod

Avatar
snaip

Community Member, 180 Posts

9 March 2011 at 10:36pm

ehhh i had wrong name object in return

public function SearchForm() {
....

return new Form(....);

}

i had

return new SearchForm(....) and it makes an error :)

btwg thanks for the method name to change the form method :)