JS-FileUploader v. 2 Demo
GitHub

Disabling sumit button while uploading

This demo shows how the submit button can be disabled while file is still loading adding the data-disable_submit="true" attribute.

FileUploader adds hidden fields for server-side registration only after the completion of the file upload process. Therefore, if the form is submitted before the upload has been completed, the fields with the file data will not be present.

To avoid (not completely) this problem, the submit button can be disabled, as in this example. A more efficient procedure can be performed using a callback function.

Drag or select a new image and check the submit button status in the browser console.

Back to demo index

Take a look at the "About the demo" section in the README file for info about the following code boxes.

Back to demo index