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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

FROM method="GET" - recomendations


Go to End
Reply


3 Posts   626 Views

Avatar
Futureweb

Community Member, 243 Posts

26 August 2012 at 10:05pm

Hi all,

I have a search form on a site, and i'm passing the form through to a certian url using:

$form->setFormAction('/home/search');

All good, but I want the search criteria to be in the URL, so that if the user book marks, 'likes' or links to the results, it all works. So, I use
$form->setFormMethod('GET');

However, the URL now includes "SecurityID=6f9fd5058086c374bd02bf7f642a6c63aa5b39f5", which I don't particularly want in the URL.

Is there any easy way to just pass through form info, but not the security ID?

Avatar
(deleted)

Community Member, 473 Posts

26 August 2012 at 10:37pm

Also call $form->disableSecurityToken();

Avatar
Futureweb

Community Member, 243 Posts

26 August 2012 at 10:41pm

perfect - thanks!