views:

27

answers:

1

I've got the following code for a search form, but how would I add an ID or a class to the submit button?

<% form_tag '/wine/search/', :method => 'get' do %>
    <%= label_tag "Search" %>
    <%= text_field_tag :search_string, params[:search_string] %>
    <%= submit_tag "Go" %>
<% end %>

Thanks

+4  A: 
submit_tag "Go", :class => "some_class"
submit_tag "Go", :id=> "some_id"

From the Rails API FormTagHelper

clyfe
Perfect. thank you
Probocop