Do you want to set an automatic expiry date on a form in WordPress? Adding an expiration date to a form is useful if you need to set a deadline for responses.
In this article, we’ll explain how to:
- Schedule a form to automatically open and close on your chosen dates.
- Close your form when you reach the maximum number of entries.
How to Add an Expiry Date to a Form
In This Article
1. Install the WPForms Plugin
Setting your forms to expire on a given date is easily achieved with the right tools. To create an automatically expiring form, the quickest way is to get the WPForms Pro license.
Next, you’ll want to install and activate the WPForms Form Locker addon, which will enable the form scheduling features on your form.
To do this, go to WPForms » Addons.
Now, look for the Form Locker addon inside the addons page. You can also look it up by using the search box.
Click the Install Addon button under the Form Locker Addon and click Activate. You’ll know that it’s active when the switch here turns green.
In this example, I’ll create a new job application form. I’m going to set a time limit on the form so that it automatically closes on the submission deadline.
2. Choose a Form Template
WPForms comes with 1,400+ WordPress form templates to help you get started. This makes the process a lot faster.
Click Use Template on any template to open it in the form builder.
Once the form opens up, you’re free to customize it any way you like.
You can add additional fields to your form by dragging them from the left-hand panel to the right-hand panel.
You can also click on a form field and drag it to a different place if you want to reorder the fields.
When your form looks the way you want it to, click Save at the top of the form builder window.
3. Set an Expiration Date
Now, we can set the form expiry date. This will automatically set the deadline so that no form submissions can be sent after the date and time we choose.
On the left, click Settings. and then click Form Locker.
Now, click on the Form Scheduling toggle button.
You’ll now see additional options for setting the start and end dates for your form.
Here’s how to use the scheduling settings:
- Set the Start Date and Start Time to automatically open form submissions on the date you choose. You can click the red X icon to delete the time or date here.
- Set the End Date and End Time to set an end date for form responses.
- Enter a Closed Message that will be displayed if someone visits the form when it’s closed.
You can set just a Start Date and Time, or just an End Date and Time. You don’t have to set both if you don’t want to.
💡 Pro tip: Keep in mind that the times here need to match the timezone you’re using in WordPress. This article on changing the date and time format in WordPress will show you how to check all of the time settings on your site.
Before you finish up, it’s a good idea to click Notifications on the left to set up the email notifications.
By default, WPForms will send you an email notification. You can click Add New Notification if you also want to send your visitors an email when they fill out your form.
For help setting this up, check out this guide on how to create multiple form notifications in WordPress.
We’re ready to save our settings here, so let’s click Save.
4. Publish Your Form On Your Website
WPForms lets you add forms anywhere on your website. You can put forms in pages, posts, or in the sidebar.
In this example, we’ll create a new WordPress page for our new form. You don’t need to use any code for this step.
Go ahead and click the Embed button at the top of the form builder window.
Now click Create New Page.
Name your page and click Let’s Go.
WPForms will automatically create a new page for your form. You’ll see a preview of how the form will look when submissions are open.
To publish your form, click the blue Publish or Update button at the top of the block editor.
Now that the Form Locker is active, your form will only be available after the Start Date, and before the End Date.
After the End Date, our form shows the closed message we set up earlier:
You can customize this message however you want. For example, you could add a link back to the main Jobs page on your website here too.
5. Limit Entries (Optional)
Do you want to limit the number of form entries that you receive? For example, if you’re taking registrations for an event, you can close the form when the capacity has been reached.
You can do this using the Form Locker addon too.
This method works with the form expiry date settings we already talked about. When you hit maximum capacity for your event, your form will close automatically, even if the expiry date is still in the future.
Under Entry Limit, click the checkbox to set a maximum number of entries before the form expires:
WPForms will automatically close your form when you hit the number of entries in the Limit field.
Once the maximum number is reached, anyone who visits your form will see the Closed Message you set up.
You can also use the Form Locker addon to:
This gives you lots of control over when your forms are available on your website.
Next Steps: Review Your Form Entries
Now that you’ve set up your form, you’ll want to review your entries and download the file attachments.
WPForms lets you save your form data in the WordPress database. This makes it super easy to review all of your entries in 1 place.
Ready to set an expiry date on your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes the Form Locker addon and offers a 14-day money-back guarantee.