Restrict Dates In Gravity Forms
1.INTRODUCTION #
Plugin Purpose
Restrict Dates In Gravity Forms is a Gravity Forms add-on that allows users to restrict the selectable dates in your form date picker field.
This add-on will help you to introduce a date field in your Gravity Form, then manages the date ranges and days to be displayed to the user.
2.PLUGIN FEATURES #
- Using this add-on Admin will have an option to use two fields in Date field, namely; Minimum and Maximum date ranges. Admin can set Date based on current date or set specific Dates for their requirements and preferences.
- Using the add-on Admin can define allowed future or past dates.
- Admin can restrict dates by days of the week (Determine which days of the weeks will be selectable).
- Link Date to another defined past field (Date selected in one date field will be filled as the Minimum or Maximum) date in another field.
3.GETTING STARTED #
- Head over to the Forms.
- Click on the Add New button.
- When clicks on the Add New button it prompts the form wizard.
- Enter the Title.
- Enter the Description (it’s optional) you may leave this empty.
- Hit the Create Form button.
- The form that you have created earlier will display under the Forms menu.
- Click on the Edit link to enter the form fields area.
- On the side area of the form page, there are the following fields option available:
- Standard Fields.
- Advanced Fields.
- Post Fields.
- Pricing Fields.
- Open Advanced Fields toggle menu.
- Advanced Fields contains Date filed.
- Drag and drop the Date field in the form section.
4.HOW TO USE PLUGIN #
- Open date field settings.
- Navigate to section Date settings and click on Advanced tab.
- Admin can set the Minimum Date, Maximum Date, Days of the Week.
- The Minimum and Maximum Dates setting allows you to specify the beginning and ending dates that can be selected in the date field.
4.1.SET SPECIFIC DATE #
- Specify a specific date which will be the earliest (Min) or latest dates (Max) selectable in the current Date field.
Backend-Configuration
- Navigate to Date Section and click on Advance Tab.
- Access dropdown of Minimum and Maximum Date.
- Select Set Specific Date.
- Add Specific Date.
Frontend Impact
- Only Specific date i.e 02/18/2022 is selectable.
4.2.CURRENT DATE #
-
- The current date will be the earliest (Min) date and latest (Max) selectable in the current Date field.
- This is a dynamic value and will automatically adjust to the current date with each new day.
- The Date period settings.
- This setting allows you to modify the selected date by adding or subtracting days, weeks, months or years. It’s available when the Current Date option is selected.
Backend-Configuration
- Go to Date Section.
- Click on Advance Tab.
- Access dropdown of Minimum and Maximum Date.
- Select Current Date.
- Select Increment (+) sign.
- Add number of Days/Months/Years to be incremented.
- Follow same aforementioned steps.
- Select decrement (-) sign.
- Add number of Days/Months/Years to be decremented.
Frontend Impact
- Dates can be selected after increment and decrement of number of Days/Months/Years.
4.3.ADD EXCEPTION #
If you want to add an exception date you can add by clicking the Add Exception button. An exception works with both selectable dates and unselectable dates. If the excepted date is selectable, it will now be unselectable. If the excepted date is unselectable, it will now be selectable.
Backend-Configuration
- Access Date Section.
- Access Advance Tab.
- Select Add Exception.
- Add Excepted Dates.
Frontend Impact
- All dates are selectable except restricted dates.
4.4.DAYS OF THE WEEK #
-
- This setting allows you to restrict which dates are selectable based on the days of the week (e.g. Monday – Sunday).
- By default, all days are allowed. Uncheck all days option to select specific days.
Backend Configuration
- Access Date Section.
- Click on Advance Tab.
- Access Minimum and Maximum Date dropdown.
- Enter Minimum and Maximum Dates.
- Check mark they weekdays to be selectable.
Frontend Impact
- Dates of check-marked days i.e. Monday, Wednesday, Friday and Sunday are selectable only.
Help Guide Powered by Documentor