DOCUMENTATION

  • Field Types
  • Files
Search »

File Upload Field

Adding to your forms

Adding file uploads to your internal and Form Builder forms is extremely easy. As an administrator, just edit your form and go to the Fields tab. There, pick the "File" field type for the form field that you want, click save, and you're done! (Yes, really).

To confirm it's working, click on the Edit/View toggle icon at the top right of the page. There, create or edit a submission in the form (in a View that contains your file field). For the field, try uploading a file. Make sure that the file matches whatever criteria you specified on the Settings » Fields page - namely, size and filetype.


External forms

For external forms (including your API forms) you need to do a little more work.

1. Update the <form> tag

Any form that contains a file field needs to let the server know that the form being submitted through it may contain a file. To do this, the form tag needs a new enctype attribute:

2. Add the file upload field

Next, make sure your form actually contains the file upload field.

If you would like to upload multiple files through this field and have configured your field to allow for this, set the markup to the following:

The [] at the end of the field name tells PHP to expect an array; the multiple="multiple" is also needed for the same thing.

3. For API forms

For forms that use the API, you'll need to pass the "file_data" => $_FILES key-value pair to the ft_api_process_form function, as shown in this tutorial.