How can I set the class and id attribute for the form element through semantic_form_for?
The following code:
<% semantic_form_for (@meetingsearch), :class => "new_meeting_search", :id => "meeting_search" do |f| %>
gives me:
<form action="/meetingsearches" class="formtastic meetingsearch" id="new_meetingsearch" method="post">
This should do what you need (untested):
For clarification,
semantic_form_forwraps around Rails’ built inform_for, so this is exactly how you do it in regular Rails forms also: