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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

set form method to POST


Go to End


3 Posts   1962 Views

Avatar
snaip

Community Member, 181 Posts

9 March 2011 at 1:31am

how ??

Avatar
Willr

Forum Moderator, 5523 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, 181 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 :)