%= bootstrap_form_for @contact, url: @contact.new_record? ? exhibit_contacts_path(@exhibit) : [@exhibit, @contact], layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10', html: {class: 'col-md-9' } do |f| %> <%= f.text_field :name, placeholder: t(:'.name.placeholder') %> <%= f.fields_for(:contact_info) do |contact_info| %> <% Spotlight::Contact.fields.keys.each do |field| %> <%= contact_info.text_field field, value: @contact.contact_info[field], placeholder: t(:".#{field}.placeholder") %> <% end %> <% end %> <%= f.file_field :avatar, data: { croppable: true, aspect_ratio: 1, box_width: 600 } %>