# Using 'GET'-method in Forms

**URL:** <https://www.ruby-forum.com/t/using-get-method-in-forms/97267>\
**Category:** Rails\
**Created:** [January 25, 2006, 4:44pm UTC](https://www.ruby-forum.com/t/using-get-method-in-forms/97267 "2006-01-25T16:44:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timo\_Pick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Timo\_Pick](https://www.ruby-forum.com/u/Timo_Pick)\
**Post date:** [January 25, 2006, 4:44pm UTC](https://www.ruby-forum.com/t/using-get-method-in-forms/97267/1 "2006-01-25T16:44:36Z")

</div>

Hi all,

I’m using a selection-list / dropdown-list to choose an element in a  
number  
of grouped elements. Is there a way of passing an element\_id to the form  
AND  
using the HTTP-‘get’-method? I found that the \<% start\_tag %\> has a  
:method-switch as an option, but it passes the arguments on like  
“/controller/action/?action=1”. I would need something like  
“/controller/action/1”

Can you help?

---

<div class="post-metadata">

**Author:** ![Timo\_Pick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Timo\_Pick](https://www.ruby-forum.com/u/Timo_Pick)\
**Post date:** [January 25, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/using-get-method-in-forms/97267/2 "2006-01-25T20:49:07Z")

</div>

My guess is you’ll have trouble getting a form to submit with a url like  
that. Forms submit there data as key/value pairs usually.

But, something like /controller/action/?id=1 isn’t really a problem, you  
can still access params[:id].

I’m not sure that really answers your question … can you make it a bit  
clearer?

-Jonny.

Timo Pick wrote:

> Hi all,
> 
> I’m using a selection-list / dropdown-list to choose an element in a  
> number  
> of grouped elements. Is there a way of passing an element\_id to the form  
> AND  
> using the HTTP-‘get’-method? I found that the \<% start\_tag %\> has a  
> :method-switch as an option, but it passes the arguments on like  
> “/controller/action/?action=1”. I would need something like  
> “/controller/action/1”
> 
> Can you help?

---

<div class="post-metadata">

**Author:** ![Timo\_Pick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Timo\_Pick](https://www.ruby-forum.com/u/Timo_Pick)\
**Post date:** [January 25, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/using-get-method-in-forms/97267/3 "2006-01-25T23:39:25Z")

</div>

You solved it. I became just too used to the pretty-url thing, that i  
ignored the fact that its already working as a conventional url.  
thanks.
