# Simple GET request question

**URL:** <https://www.ruby-forum.com/t/simple-get-request-question/80244>\
**Category:** Rails\
**Created:** [December 22, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/simple-get-request-question/80244 "2006-12-22T19:22:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [December 22, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/simple-get-request-question/80244/1 "2006-12-22T19:22:35Z")

</div>

If I have this:

“”

and I submit this form, should I not expect the parameter (aqi\_id = 596)  
to make it to the server?

When I see the request in my mongrel log, I see:

“GET /artisan\_qualifiers/display\_quotes HTTP/1.1”

Is this expected or not?

Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [December 22, 2006, 7:32pm UTC](https://www.ruby-forum.com/t/simple-get-request-question/80244/2 "2006-12-22T19:32:30Z")

</div>

I could have sworn this worked before.

However, I simply moved the param to a hidden field in the form and all  
is well.

Is it not valid to have query params in a form action attribute?

WG

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [December 22, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/simple-get-request-question/80244/3 "2006-12-22T19:35:27Z")

</div>

No it’s not well. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [December 22, 2006, 7:41pm UTC](https://www.ruby-forum.com/t/simple-get-request-question/80244/4 "2006-12-22T19:41:28Z")

</div>

This seems to work.

\<%= form\_tag({ :controller =\> ‘artisan\_qualifiers’, :action =\>  
‘display\_quotes’ }, :method =\> ‘get’, :style =\> ‘display: inline’)%\>  
\<%= hidden\_field\_tag(:aqi\_id, quote\_input.id) %\>  
\<%= submit\_tag(‘Show Quotes’, :style =\> ‘width:  
95px;’) %\>  
\<%= end\_form\_tag %\>

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [December 23, 2006, 8:09pm UTC](https://www.ruby-forum.com/t/simple-get-request-question/80244/5 "2006-12-23T20:09:35Z")

</div>

Wes G. wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

You must do it this way, the HTML form will ignore the query string you  
pass in the action=‘’ and just send the form to display\_quotes. Unless  
you include the hidden field (or another type of form field) with the  
value of quote\_input.id, the aqi\_id will never be received.
