Enable Specific Weekdays with the Calendar Item
Formsite’s Calendar item lets form owners collect dates from a monthly calendar popup. Other settings like minimum and maximum dates and the ‘today’ variable makes the Calendar item powerful already. A recent enhancement now lets the Calendar item disable and enable specific weekdays.
Examples of forms that use the Calendar include:
- Scheduling forms
- Volunteer sign-ups
- Shipping instructions
- Appointment requests
The Calendar Item
Formsite’s Calendar item has settings that let form owners collect dates in the preferred format. Editing the item shows a format setting with a list of common date formats. The date format automatically shows the selected date in the correct format so it’s saved in the result correctly.
Another setting lets form owners set a minimum and maximum date allowed. For example, entering July 1, 2022 as the min date only allows for choosing that date or a date after. Setting the max setting to Aug 31, 2022 would prevent choosing any dates after.
The ‘today’ variable allows for setting dates relative to the day the visitor is completing the form. A common use for the variable collects the date of the result by adding a Calendar item with the default value set to ‘today’.
Using the variable with modifiers lets form owners set default and min/max dates relative to today. For example, setting the min to ‘today-30’ only allows for entering dates up to 30 days in the past. Setting the max value to ‘today+7’ allows for 1 week from today.
For age restrictions, calculate the number of days like 21*365 to see how many days for a 21-year old (7665). Using that as the max setting on a Calendar item for their birthday allows only those who are 21 years old and older.
Enable Specific Weekdays
The Calendar item recently received an enhancement to let the form owner choose which days of the week to show. That lets form owners only allow days the organization is open, like Monday-Friday.
To disable weekends or any weekday, simply uncheck the box in the Calendar item and those days will not allow selections.