[support] Form with GET method - best practice?

Jamie Holly hovercrafter at earthlink.net
Sun Jul 8 06:53:08 UTC 2012


The best route is to have the form submit via a post then in the submit 
handler build your url with the query string and do a redirect to that. 
You can look at the Apache Solr module for ideas:

http://drupal.org/project/apachesolr


Jamie Holly
http://www.intoxination.net
http://www.hollyit.net

On 7/7/2012 10:31 PM, Georg Jaehnig wrote:
> Hi,
>
> I am quite new to Drupal and I want to build a search form that uses
> the GET method and that puts only the search value into the GET
> variables, e.g. the form is on
>
> http://mysite.com/search
>
> and when the user enters "term" and clicks Submit, he arrives at
>
> http://mysite.com/search?q=term
>
> Is there a best practice for that?
>
> This solution seems to work,
> http://drupal.org/node/1391612#comment-5420728
> however it still additionally puts the "form_id" value into the GET
> variables. Is there a way to omit that?
>




More information about the support mailing list