Hello I have an issue working with a file field that accept more than one file

When the file field is empty there is no problem and is possible to add new files without problem.
But when there is one file in the field the summit button is hide.

Problem

In order to fix I modified the editablefields.js

      // There is only one editable field in that form, we can hide the submit
      // button.
      if ($this.find('input[type=file]')) {
      } else if ($this.find('input[type=text],textarea,select').length == 1) {
        $this.find('input.form-submit').hide();
        $this.find('input[type=text],textarea,select').change(function() {
          $this.find('input.form-submit').triggerHandler('click');
        });

But I don't if that is the best way to solved

Thanks

CommentFileSizeAuthor
#1 Afterchance.png21.2 KBzatarain21
Problem1.png18.16 KBzatarain21

Comments

zatarain21’s picture

StatusFileSize
new21.2 KB

Here the image with the result after the change

AfterChange

johnv’s picture

Title: Problem multiple files edit » Hiding 'Submit'-button is not specific enough for multiple-value File field

I think you have the same problem as #1398946: Hiding submit button is not specific enough

noahadler’s picture

I have the same issue, and this patch helps. The only thing I notice is that when the multi-value field is set to 1, the Save button is superfluous and the whereas with this patch applied and the field set to Unlimited values, the uploaded files don't get attached to the field unless the Save button is pressed.

noahadler’s picture

I tried to add a image to ilustrate the change