Contribution Date
Technology
Contribution Project
Contribution Details
I am facing similar issue but seems like the problem is different than the one explained above.
When using AJAX for form submission (CTOOLS or Drupal AJAX framework)
Scenario 1:
- Keep the file field blank and click on save/submit button of the form
- A server side error is generated (in my case) that the file is required
- Client side validations of file size and file type are gone
Scenario 2:
- Keep the file field blank and click on upload button of the form
- Nothing happens and the form field is loaded again as is
- Client side validations of file size and file type are gone
To fix this, for now I have disabled the submit/save and upload button until a valid file is uploaded, as for my case all files were required.
I am assuming that when an error comes events are not bound again to the same element. It works for second file field in case unlimited values are allowed and first file is uploaded properly.
Contribution Issue Link
Contribution Link
Files count
0
Patches count
0