Monday, 15 July 2013

forms - Form_tag with Role in Rails 3 to work with Bootstrap -



forms - Form_tag with Role in Rails 3 to work with Bootstrap -

twitter bootstrap uses role attribute in forms, e.g. <form role="form">.

how can include role attribute using rails 3 form helper form_tag?

this similar question include bootstrap role attribute in rails form helper form_tag instead of form_for

the below should work:

<%= form_tag your_path_url, { class: 'form-class', id: 'form-id', role: 'form', method: 'post' } %> <% #your form content here %> <% end %>

ruby-on-rails forms twitter-bootstrap role

No comments:

Post a Comment