Form Conditional Logic Dates

In this guide we will learn how to use the Date and Time form fields with conditional logic to make anything conditional based on dates and time.

Date-Based Logic

Date-based logic supports static dates, relative dates, days the week, and wildcards. This is done using four comparison operators: is, is not, greater than, and less than. Multiple rules can be combined to match date ranges or exclude specific dates from the match.

Static Dates

To compare a Date field to a static date, select the Date field, choose a comparison operator, and enter the static date to compare against.

Display field if current date is greater than April 20, 2021:

woorise forms conditional logic after date

Date values must be entered using the US date format: MM/DD/YYYY.

Relative Dates

There’s two ways that relative dates are supported in Conditional Logic Dates:

  • Comparing a user-inputted date to a relative date.
  • Comparing the current date to a static or relative date.

1. User Input

Comparing user input to relative dates is done using the conditional-logic-only merge tag {today}. It allows conditional logic to be applied to fields based on whether the selected date is, is not, is greater than or is less than the current date.

Display field if selected date is today:

forms conditional logic user input date

The {today} merge tag supports modifiers for making date comparisons like:

  • Date is at least 2 weeks away: {today:+2 weeks}
  • Date is no more than 90 days before today: {today:-90 days}

2. Current Date

To compare the current date to a static or relative date, follow these steps:

  1. Add a Date field to your form (it will default to the Datepicker date type).
  2. Name it something like “Today”.
  3. Open the field settings for this field and navigate to the Advanced tab.
  4. Set {date_mdy} as the default value (this will automatically populate the current date into this field).
  5. Now you can enable conditional logic on any other field and configure date-based conditions by comparing this field to a date value (see examples above).

forms conditional logic current date

If you want to hide the “Today” date field from being visible to the user, you can hide it by adding hide to the field’s CSS Class Name setting on the Appearance tab.

Days of the Week

Use the following conditional-logic-only merge tags to check for a specific day of the week:

  • {monday}
  • {tuesday}
  • {wednesday}
  • {thursday}
  • {friday}
  • {saturday}
  • {sunday}

These are used in the same manner as the {today} merge tag.

forms conditional logic days of the week

Weekend or Weekday

Using the days of the week merge tags, you can apply conditional logic based on whether the date falls on a weekend or weekday.

First, we’ll tackle checking for weekend dates.

  1. Open the field settings for the field that should be shown/hidden based on the day of the week and navigate to the Conditional Logic tab.
  2. Enable Conditional Logic.
  3. Select Any from the drop down that contains the options Any and All.
  4. Select your Date field from the first drop down.
  5. Select is from the second drop down.
  6. Enter {saturday} in the third input.
  7. Add a new rule by clicking the (+) button at the end of the row and follow steps 4 and 5 again.
  8. Enter {sunday} for the third input on the new condition.
woorise forms conditional logic date weekend

You can follow the same steps to check for a weekday. The only differences are:

  • Select All from the drop down that contains the options Any and All.
  • Select is not from the second drop down of each condition.
woorise forms conditional logic date weekday

Date Wildcards

If you want to target a specific day of the month, a specific month, or a specific year, you can use the * character as a wildcard.

Display field if selected date is within June:

forms conditional logic date june

Display field if selected date falls on the 5th day of any month:

forms conditional logic date fifth

Display field if selected date is within the year 2021:

forms conditional logic date year

Time-Based Logic

Time-based conditional logic supports both static and current time comparisons using the same operators as Date-based logic.

Static Times

To compare a Time field to a static time, select the Date field, choose a comparison operator, and enter the static time to compare against.

Display field if selected time is greater than 12:00 pm:

forms conditional logic static time

Time values must be entered using the US time format: hh:mm am or hh:mm pm

Current Time

Use the special Δ Current Time option to show or hide fields based on the current time.

Display field if current time is before 12:00 pm:

forms conditional logic current time

Not quite what you’re looking for?

Contact our support team through email and chat or get the job done with a pro.

Join more than 80,000 brands using Woorise

Easily create landing pages, forms, surveys, quizzes & viral giveaways that drive real user engagement.