form do |f|
f.inputs "Model Info" do
f.input :title
f.input :published
f.input :path
end
f.inputs "Custom HTML Stuff" do
"<div id=\"element-name\">
Some kind of content
</div>".html_safe
end
end
# Conditional show/hide using js
cancel_reason_style = f.object.cancelled? ? "display:block" : "display:none"
reject_reason_style = f.object.rejected? ? "display:block" : "display:none"
f.input :reject_reason, :wrapper_html => {:style => reject_reason_style}, :hint => "Required if status event rejected"
f.input :cancel_reason, :wrapper_html => {:style => cancel_reason_style}, :hint => "Required if status event rejected"
f.inputs "Member Details" do
f.input :first_name
f.input :last_name
f.input :email
if !f.object.new_record?
f.input :password
f.input :password_confirmation
end
end