Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » FROM method="GET" - recomendations

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

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

Page: 1
Go to End
Author Topic: 433 Views
  • Futureweb
    Avatar
    Community Member
    232 Posts

    FROM method="GET" - recomendations Link to this post

    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?

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: FROM method="GET" - recomendations Link to this post

    Also call $form->disableSecurityToken();

  • Futureweb
    Avatar
    Community Member
    232 Posts

    Re: FROM method="GET" - recomendations Link to this post

    perfect - thanks!

    433 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.