[alert type=”notice”]This free plugin for WordPress requires you to have a copy of Gravity forms.[/alert]
Gravity forms is about as easy to use and versatile a WordPress plugin as you can get, but every now and again I run into something it just doesn’t do. In this case I needed a date field that can be restricted to just work between two dates. I looked through the Gravity forms documentation and found out about the various actions and filters that were available, then I found an excellent tutorial on WPSmith.
After reading these two resources I managed to create a plugin that you can download and use free of charge. The plugin adds an extra field type (date in range) into the form editor. After you add the field, it gives you two extra options on the advanced tab – Start Date, and End Date. Both are optional, which means you can create a “Dates after…” , a “Dates before…”, and a “Dates between…” field without any issues.
The Gravity forms date limiter plugin also lets you create customised validation messages that include the start and end dates. Just include %%startdate%% and %%enddate%% in the validation message and they will be replaced at runtime.
The only other option is the date format – this can be changed in Settings -> Gravity Forms – Date Limiter. Valid options are dd/mm/yy and mm/dd/yy.
I’d love to hear where you’re using this plugin, get feedback, or get feature requests – just drop me an email via the contact page.
[button color=”green” size=”large” link=”http://www.smartredfox.com/wp-content/uploads/2013/05/gf-date-limiter_0_5.zip” target=””]Download Gravity Forms Date Limiter[/button]
2 thoughts on “Gravity Forms – Limited date field”
I installed your Gravity Forms – Limited date field plugin.
I am having a problem in that it doesn’t populate the date field when you select a date. Everything seams to work as you described except that. Which of course is the reason for having your plugin.
Can you post a url to the page where it’s not working? That way I can hopefully see what’s going wrong.
Comments are closed.