Configure your form to accept file uploads
In this guide we enable existing form endpoints to accept file uploads.
You simply need to add enctype="multipart/form-data"
and a file input to your form settings and you're all set.
<form action="https://nocodeform.io/f/{your-form-id}" method="POST" enctype="multipart/form-data"> <!-- other form inputs --> </form>
Open the Forms page to list all your (active or inactive) Forms.
Adding a single file
input is the simplest way to enable the file upload for your form.
For instance, this form adds a file upload input named resume
:
<form action="https://nocodeform.io/f/{your-form-id}" method="POST" enctype="multipart/form-data"> <input type="email" name="email"> <input type="file" name="resume"> <button type="submit">Submit</button> </form>
You can always add other input fields to your file upload form
You can also add multiple type="file"
inputs to your form:
<form action="https://nocodeform.io/f/{your-form-id}" method="POST" enctype="multipart/form-data"> <input type="email" name="email"> <input type="file" name="resume"> <input type="file" name="photo"> <input type="file" name="avatar"> <button type="submit">Submit</button> </form>
HTML5 offers a unique feature to upload multiple files using a single input.
To enable this feature, add name="documents[]" multiple
to your file
input:
<form action="https://nocodeform.io/f/{your-form-id}" method="POST" enctype="multipart/form-data"> <input type="email" name="email"> <input type="file" name="documents[]" multiple> <button type="submit">Submit</button> </form>
The accept
attribute specifies a filter for what file types can be selected from the file input.
<form action="https://nocodeform.io/f/{your-form-id}" method="POST" enctype="multipart/form-data"> <input type="file" name="resume" accept=".doc,.docx,application/msword"> <button type="submit">Submit</button> </form>
The following file types are supported by NoCodeForm file upload
enctype="multipart/form-data"
attributeaccept
attribute