Do you want your users to add multiple attachments to your contact form? WPForms makes frontend file uploads easy, so you don’t need a separate WordPress file upload plugin.
In this article, we’ll show you how to allow multiple file uploads using WPForms.
How to Allow Multiple File Uploads
Providing your users the ability to upload a file in your WordPress form makes it easier for you to collect the information you need. You can allow users to upload different file formats including .doc, .xls, .csv, .pdf, an image file, an audio file, and even a video file.
By default, WPForms allows you to upload only a single file using the File Upload field. To allow multiple file uploads, you can simply add as many file upload fields as you want.
To do that, create or edit a form and drag the File Upload field from the left panel to your form.
But what if you want to allow multiple file uploads without displaying all those fields to every user?
Thanks to the conditional logic feature of WPForms, you can do this and thus, your users will be able to choose the number of files they would like to upload.
Let’s take a look at the step by step guide to allow multiple file uploads.
Make sure to take a peek at these mind-blowing digital marketing statistics for some facts that may surprise (and help) you.
Step 1: Create a New File Upload Form
After activating the plugin, go ahead and create a file upload form in WordPress. Here’s our file upload form:
Step 2: Allowing Users to Upload Multiple Files
Next, drag a Dropdown field present under the Standard Fields section and drop it to your form, just above the file upload field.
Now click on the dropdown field to see the Field Options on the left panel.
Let’s rename the dropdown field to Number of Files to Upload. Each option or choice of this dropdown will be a number. The first option will be 1, the second will be 2, and so on.
The number of choices will be equal to the number of files you want your users to upload. For the sake of this tutorial, let’s allow our users to upload a maximum of 3 files.
Now click on the File Upload field and rename it to Upload Your File.
Next, we’ll enable conditional logic for this field. Based on the user selection, we need to show multiple file upload fields in our form.
To do this, configure your conditional logic fields just like the screenshot below.
Keep in mind that new fields are added by clicking the Add new group button, which applies the OR logic. If you need more details about using the OR logic, read our guide on how to use And OR conditional logic.
In the above step, we’ve created the conditional logic for our upload field in such a way that it’ll be displayed when any number is selected.
Now duplicate this field by clicking the double paper icon on the right-hand side of the Upload Your File field.
A confirmation popup will open up asking if you want to duplicate the field or not. Just click on Ok to continue.
Let’s rename the new field to Upload Your Second File.
Now configure the conditional logic for this new field just like the screenshot below. The only change from the above step is that we removed the first field where it says the Number of Files to Upload is 1.
Again, copy the second file upload field by clicking the double paper icon and rename it to Upload Your Third File.
Configure the conditional logic field just like the screenshot below. We’ll only keep the last field where it says the Number of Files to Upload is 3.
To save the form, click on the Save button present at the top-right corner of your screen.
You can continue this process for every possible number. The only thing you need to take care is to duplicate the previous field and then remove the conditional logic of the lowest number.
That’s it! You’ve just created a multiple file uploads form in WordPress.
If you enjoyed this article, you might also want to look at some cool contact page design examples.
So what are you waiting for? Get started with the best WordPress forms plugin today.