Browse Source

docs: Add triggerUploadOnSubmit to Form docs

Renée Kooi 6 years ago
parent
commit
0b2a25aef6
1 changed files with 8 additions and 0 deletions
  1. 8 0
      website/src/docs/form.md

+ 8 - 0
website/src/docs/form.md

@@ -45,6 +45,7 @@ uppy.use(Form, {
   getMetaFromForm: true,
   addResultToForm: true,
   resultName: 'uppyResult',
+  triggerUploadOnSubmit: false,
   submitOnSuccess: false
 })
 ```
@@ -69,6 +70,13 @@ Configures whether or not to add upload/encoding results back to the form in an
 
 The `name` attribute for the `<input type="hidden">` where the result will be added.
 
+### `triggerUploadOnSubmit: false`
+
+Configures whether or not to start the upload when the form is submitted. When the user presses a submit button, this will prevent form submission, and instead upload files. You can then:
+
+ - use `submitOnSuccess: true` if you need the form to _actually_ be submitted once all files have been uploaded.
+ - listen for `uppy.on('complete')` to do something else if the file uploads are all you need. For example, if the form is used for file metadata only.
+
 ### `submitOnSuccess: false`
 
 Configures whether or not to submit the form after Uppy finishes uploading/encoding.