when the user click on “Search” I would like it to point to
http://curentpage/?filter=searchtext (the filtering code is already
written)
it would look like this:
<%= start_form_tag(url_for_options = {}) %>
<%=text_field (<my_filter>) %>
<%= submit_tag(value = “Search”)%>
any idea how to do this?
thanx in advance
Patrick A. wrote:
any idea how to do this?
<%= form_tag({}, :method => ‘get’) %>
<%= text_field_tag ‘filter’ %>
<%= submit_tag ‘Search’ %>
<%= end_form_tag %>
–
We develop, watch us RoR, in numbers too big to ignore.
On 5/15/06, Mark Reginald J. [email protected] wrote:
<%= submit_tag(value = “Search”)%>
any idea how to do this?
<%= form_tag({}, :method => ‘get’) %>
<%= text_field_tag ‘filter’ %>
<%= submit_tag ‘Search’ %>
<%= end_form_tag %>
ok thanx a lot, I’m using params[:filter] in my controller and it works
great.
Now I’m trying the post method like this:
<%= form_tag({}, :method => ‘get’) %>
test autocomplete
<%= text_field_with_auto_complete :stage, :sujet %>
<%= submit_tag ‘Search’ %>
<%= end_form_tag %>
the autocomplete part works great but how can I get the posted value? I
get
a url like ‘?object%5Bmethod%5D=textvalue’
thanx in advance
Pat
Patrick A. wrote:
Now I’m trying the post method like this:
<%= form_tag({}, :method => ‘get’) %>
test autocomplete
<%= text_field_with_auto_complete :stage, :sujet %>
<%= submit_tag ‘Search’ %>
<%= end_form_tag %>
the autocomplete part works great but how can I get the posted value? I
get a url like ‘?object%5Bmethod%5D=textvalue’
This’d probably work:
<%= text_field_with_auto_complete :stage, :sujet, :name => ‘filter’ %>
–
We develop, watch us RoR, in numbers too big to ignore.