I'm trying to add dropzone inside a rails simple form with nested fields like this :
<%= simple_form_for(@product, url: create_product_path, method: :post, validate: true, :html => {:class => 'dropzone', multipart: true}) do |f| %>
<%= f.input :name %>
<%= f.input :price %>
<%= f.input :color %>
<%= f.input :description %>
<div class="fallback">
<%= f.simple_fields_for :attachments do |a| %>
<%= a.input :image, label: false, as: :file, input_html: { :multiple => true } %>
<% end %>
</div>
<%= f.button :submit, "Submit" %>
<% end %>
The dropzone area appears but instead of just showing only on the file input area it wraps around the entire form. Any idea what I might be doing wrong here?