A File Upload field allows users to upload files (such as PDFs and images) along with their form submission. Once an entry has been submitted, you can select the file in the entry information to view it. You can also click the download icon to download the file directly.
The label will display as the title of the field or the question that is being asked on the form. You can select the icon on the right to hide the label on the form. You also can use the pop-up formatting toolbar to insert values from other fields on the form.
Allowed File Types
The types of files that can be uploaded can be restricted. For example, if you want to restrict your users to only upload PDFs, simply type in PDF. Multiple file extensions can be added, but must be separated by a comma.
The default restrictions are executable files, including: action, apk, app, bat, bin, cmd, com, command, cpl, csh, dll, exe, gadget, htm, html, inf1, ins, inx, ipa, isu, job, js, jse, ksh, lnk, msc, msi, msp, mst, osx, out, paf, pif, prg, ps1, reg, rgs, run, sct, shb, shs, u3p, vb, vbe, vbs, vbscript, workflow, ws, and wsf.
By default, files uploaded via the File Upload field retain their name (ex: picture.png) and cannot be renamed.
Maximum File Size
The maximum file size allowed for a single uploaded file is 100MB for organizations on the Individual plan and 250MB for organizations on the Pro, Team, and Enterprise plans.
The maximum file size can also be specified. In email notifications and confirmations, the limit for file attachments is a total of 17MB. If a file exceeds this amount, you will need to log in to your Cognito Forms account in order to view or download it.
Maximum Number of Files
The maximum number of files can be restricted. You cannot upload more than 20 files in a single upload field, which is the default limit.
You can use the .Count property to determine the number of files uploaded to a particular upload field. For example, the following expression checks to see if any files are uploaded and outputs a custom message depending on the file count:
=if FileUploadField.Count() > 0 then "Files" else "No files"
Make sure to replace ‘FileUploadField’ with the name of the field on your form.
Help text can be used to assist the user by providing additional instructions. Help text will display directly under the field. Use the formatting toolbar to format text, insert hyperlinks and images, and populate values from other fields on the form.
Show This Field
By default, fields will always display on the form. However, you may want to hide specific fields or sections based on certain conditions such as a selected value of another field on the form.
- Always – Field is always shown.
- When – Field will only display when specific conditions are met. After selecting this option, the Conditional Logic Builder dialog will display allowing you to select when the field or section should be displayed.
- Internally – Field will not display on the public form and will only display when a Cognito Forms user is editing the form from the Entries page.
- Never – Field will never display.
Require This Field
Requiring a field will make sure the user provides a response. When a field is required, an error message will display, and the form cannot be submitted until a value has been added to the field. Required fields are indicated by a red asterisk next to the label. By default, fields are never required.
- Always – Field is always required. User must provide a response in order to submit the form.
- When – Field is required only when specific conditions are met. After selecting this option, the Conditional Logic Builder dialog will display allowing you to select when the field is required.
- Never – Field is not required. This is the default behavior.
Set fields and sections as read-only to create simple workflows with your forms. All fields can be made read-only, with the exception of fields that are already read-only by default (Calculation, Price, Content, Page break, etc.).
- Always – Field is always read-only.
- When – Field is read-only when specific conditions are met. After selecting this option, the Conditional Logic Builder dialog will display allowing you to select when the field is read-only.
- Internally – Field will not be read-only on the public form and will only be read-only when a Cognito Forms user is editing the form from the Entries page.
- Never – Field allows user input. This is the default behavior."
You can set a custom error message that will display under your field when specified conditions become true. The conditional logic builder will allow you to add any number of rules for validating your field. Learn more about the custom error option.