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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Form Questions /

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

set form method to POST


Go to End


3 Posts   1691 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 :)