<%%= simple_form_for(@<%= singular_table_name %>, html: { class: 'form-horizontal well' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean }) do |f| %>
<%%= form_legend %>
<%- attributes.each do |attribute| -%> <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %><% (attribute.field_type == :date_select) ? ', as: :string' : '' %> %> <%- end -%>
<%%= f.button :submit, class: 'btn btn-primary' %> <%%= cancel_button %>
<%% end %>