simple_form_for(['<%= options.namespace %>', @item], html: {multipart: true, novalidate: true, class: 'js-file-form'}, remote: true, data: {type: “html”}) do |f|

<% @form_attrs.each do |attr| -%>

= fae_input f, :<%= attr %>

<% end -%> <% @attachments.each do |attachment| %> <% if attachment.type == :image -%>

= fae_image_form f, :<%= attachment.name -%>

<% elsif attachment.type == :file -%>

= fae_file_form f, :<%= attachment.name -%>

<% end -%> <% end -%>

= f.submit