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
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
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
No it’s not well. What am I doing wrong?
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 %>
Wes G. wrote:
–
Posted via 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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs