How to Create a File Upload Form in WordPress

Do you want your website’s contact form to support file uploads from site visitors?

Whether you’re hosting a photography contest and requiring applicants to upload their best shots or a job application and hoping to collect resumes, collecting attachments is a must.

Here, you’ll learn the simple steps to build a WordPress-based file upload form.

Making a WordPress-based file-upload form Why Make a WordPress-Based File-Upload Form?
A file upload form is a terrific addition to your WordPress site if you want to collect user-submitted files of any kind.

Users can upload a variety of file formats, including photos, PDFs, Word documents, and more.

You and your users will both benefit from the convenience of a file upload form. Create a form with all the necessary fields to collect the information you need without having to send many emails back and forth.

The information submitted through your form should be saved in your WordPress database immediately. In this method, you won’t have to worry about losing the submissions because of a lost or deleted email.

So, let’s have a look at how to make a WordPress upload form.

WordPress: Creating an Upload Form
In this guide, we will be use WPForms, the premier WordPress contact form plugin.

The WPForms plugin needs to be installed and activated first. Check out our comprehensive tutorial on how to set up a plugin for WordPress for additional information.

Please be aware that WPForms also has a free version. However, the file upload form template is locked unless you upgrade to the Pro version of the plugin.

After installing and activating WPForms, go to the WPForms » Add New page in the WordPress dashboard.

The ‘Search Template’ page loads, where you may give your form a title. You should also use the search bar on the left to find the file upload form template.

When you get to the ‘File Upload Form’ section, click the ‘Use Template’ button.

Pick the Document Submission form layout.
The File Upload Form will be pre-made in the WPForms editor before redirecting you there.

The pre-made file upload form template can be used as-is, or you can add new fields by dragging and dropping them from the ‘Add Fields’ panel.

A pre-made form to upload files has been generated for you.
The form’s ‘File Upload’ field’s configurations will appear in the left column once you click on it.

By default, the form accepts the following file types:

Formats accepted for images are.png,.gif, and.jpg.
File extensions:.doc,.xls,.ppt,.pdf
Music: wav, mp3, and mp4
Formats accepted for video include mpg, mov, and wmv.
Simply enter the extensions for the file types you wish to accept into the “Allowed File Extensions” field.

The.png,.gif, and.jpg file types will all be supported in this guide. Make sure to use commas to denote different file types.

Enter the type of file extension
For security purposes, WordPress restricts the file formats that can be uploaded to sites. If you wish to let users upload files that aren’t supported by default, you can add support for those files to WordPress.

You have the option of limiting the total number of files and the maximum file size. Our tutorial will accept up to three photographs, each of which can be as large as 50 MB.

Turning on the ‘Required’ button will stop users from submitting the form without uploading the requested file(s). This indicates that you cannot send the form without uploading at least one file.

Select the quantity and size of files to upload.
In the following step, select the ‘Advanced’ menu item.

The File Upload Field is formatted in a modern way that allows users to simply drag & drop files into it.

This can be changed, though, if you’re short on form real estate or just prefer a more traditional upload field. The ‘Classic’ option is already available in the ‘Style’ dropdown menu.

One file only can be posted to the standard upload box. A form requires several File Upload Fields if users are expected to contribute more than one file.

Select “Classic” from the menu’s “Form Style” drop-down box.
The ‘Store file in WordPress Media Library’ option allows you to save the uploaded files in the WordPress Media Library. The uploaded files can then be easily embedded into a post or page.

If we are holding a photography contest, for instance, we may wish to showcase the top entries in our announcement of the winner.

Even if you don’t check this box, the files you upload will be stored in your WordPress database. Your WordPress hosting account just stores them in a different folder.

To upload files to the form’s media library, you must activate this setting.
When you click on a form field, its options will appear in the left column for you to modify.

The fields on your File Upload form are completely customizable.

Add a Website/URL field to the form, for instance, and people can send you the address of their site.

Add new fields and then save the form.
The ‘Save’ button may be found in the upper right hand corner of the screen; use it when you are ready to save your form.

Configuring Email Alerts for Your Document Upload Form
The ‘Settings’ tab can be accessed from the left side of the form, where notifications can be modified. The ‘Notifications’ tab is easy to find once you get there.

The form is set up to automatically notify the specified admin email address.

This is your email address for your self-made WordPress site. If you don’t want to use that address, replace “admin_email” with your own.

Specify a new email address to be notified at.
Check the Settings » General tab in your WordPress dashboard if you are unsure if “admin_email” is your actual email address.

Find the email address of the administration once you are there. The admin email can be updated in this section.

Inquire within the official correspondence inbox
Remember to save your adjustments by using the ‘Save Changes’ button when you’re finished.

Check out our guide on making a contact form with multiple notice recipients if you need the submitted files emailed to more than one person.

After a form is submitted, a confirmation message is displayed to the user.

To do this, select Confirmations from the left-hand menu of Settings. The ‘Confirmation Message’ field is where you should enter the message. You have the option of using bold and italic formatting as well.

Modify the Verification Message
After making edits to the form, please remember to save it.

To close the form editor, use the ‘X’ in the upper right corner.

Inserting an Online File Upload Form
After finishing the form’s development, it must be uploaded to the website.

You can do this by going to the WordPress admin sidebar and opening either an existing post or page or creating a new one. In this lesson, you will learn how to implement the File Upload form on a fresh page.

To add a WPForms block, head to the Add New Block ‘(+)’ menu in the top left of the screen.

The WPForms block may be found here.
After included the block, a submenu containing options from WPForms will appear.

Choose the new File Upload form you just made.

To upload a file, select that option from the menu.
Finally, to save your work, select the ‘Publish’ or ‘Update’ button.

The File Upload form is now live on your website.

Sample of the Upload Form
The WPForms » All Forms page, accessible via the admin sidebar, is where you may make any necessary adjustments to your form at any moment.

To use the form editor, either click the name of the form or move the mouse pointer over it and select the ‘Edit’ option.

Replace form
You won’t have to re-add the form to the page if you make changes to it; instead, it will update itself automatically.

Advice: Run a test on your form to make sure everything is how it should be. Not receiving an email after submitting a form? Follow our detailed instructions to resolve the WordPress email problem.

Opening and Saving the Uploaded Documents
You can check your inbox or the WordPress admin area to view files that have been uploaded through your file upload form.

You will receive an email like this after every form submission:

See a sample of the form submission email before it’s submitted.
The actual files can be seen or downloaded by clicking on the corresponding links.

The files are also conveniently located in your WordPress administration area. To access your form, navigate to WPForms » Entries and then click on the form’s name.

Select the entry page’s file upload form to get started.
In the form submissions table, you can view the attached files.

To access more information about each form submission, you can click the “View” button.

Examine submitted forms
We hope you found this guide useful in learning how to make a WordPress file upload form. We also have a guide on how to make an email newsletter and a list of the top WordPress plugins for conducting surveys.

Leave a Reply

Your email address will not be published. Required fields are marked *