I have a form which is submitted through stimulus controller.
#form.html.haml
= form_with url: my_url, multipart: true, data: { turbo_frame: 'document_table_content', turbo_action: 'advanced' } do |f|
= f.file_field 'documents[files]', multiple: true, direct_upload: true, data: { 'dropzone-target' => 'input' }
#dropzone_controller.js
Rails.fire(this.form, "submit");
This works, I want additionally after submit to reset the file_field, I have the target through this.inputTarget
but I don't know how to remove all files from this form field.