Gravity Perks Conditional Logic Dates 1.2.5 Download GPL

Home > Downloads > Gravity Perks Conditional Logic Dates 1.2.5

Gravity Forms Conditional Logic Dates

Use Date and Time fields in your Gravity Forms conditional logic to make anything conditional based on dates and time.This plugin is part of Gravity Perks, a suite of 33+ essential Gravity Forms addons with support you can count on.

What does it do?

Gravity Forms Conditional Logic Dates adds support for evaluating conditional logic based on dates and times. It can be used to show or hide fields based on user-input dates and times, the current date and time, and even relative dates. Special merge tags and wildcards give you flexible options to precisely trigger conditional logic. Show different fields based on when a user is filling out the form, automatically adjust seasonal pricing, or send a different Notification for after-hours submissions.

Features

  • Show and hide fields based on Date and Time field values.
    Display different fields based on user input.
  • Supports static dates, current date, and relative dates.
    Flexible conditional logic to meet your form’s unique needs.
  • Date wildcards.
    Target a specific day of the month, specific month of the year, or specific year.
  • Day of the week merge tags.
    Trigger conditional logic based on weekdays, weekends, or any combination.
  • Current time logic.
    Show and hide fields based on the current time.
  • Full Gravity Forms integration.
    Use date-based and time-based conditional logic in Confirmations, Notifications, or any Feed.
  • Integrates with Gravity Forms Conditional Pricing.
    Use date-based conditional logic to adjust product pricing.

Documentation

  1. How do I enable this functionality?
  2. Feature Details
    1. Date-Based Logic
    2. Static Dates
    3. Relative Dates
      1. User Input
      2. Current Date
    4. Days of the Week
      1. Weekend or Weekday
    5. Date Wildcards
    6. Time-Based Logic
      1. Static Times
      2. Current Time
  3. Hooks

How do I enable this functionality?

After installing and activating Gravity Forms Conditional Logic Dates, Date and Time fields can be selected when creating conditional logic rules for your fields(and other places conditional logic is supported). It integrates seamlessly with Gravity Forms’ existing conditional logic UI.

After selecting a Date or Time field, you will select the operator for comparison (i.e. less than, greater than, is or is not) and enter the value to which the field should be compared.

Add a Date field to your form.
In any other field you want to show conditionally, navigate to the Advanced tab and enable Conditional Logic.
Set Conditional Logic settings based on your newly created Date field.

With Conditional Logic activated on the field, user input on the Date field determines whether your other field should display. Let’s dig into the specifics of the different configurations for Conditional Logic Dates.

Feature Details

Date-Based Logic

Date-based logic supports static dates, relative dates, days the week, and wildcards. This is done using four comparison operators: isis notgreater 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.

gp-conditional-logic-dates-afterThis field will be displayed if the date selected in the Date field is greater than June 30, 2015
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:

  1. Comparing a user-inputted date to a relative date.
  2. Comparing the current date to a static or relative date.
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 isis notis greater than or is less than the current date.

gp-conditional-logic-dates-todayThis field will be displayed if the selected date is today’s 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}
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).
{date_mdy} merge tag
If you want to hide the “Today” date field from being visible to the user, you can hide it by adding gf_invisible 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.

gp-conditional-logic-dates-is-monday
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 Advanced 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.
gp-conditional-logic-dates-is-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.
gp-conditional-logic-dates-is-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.

This field will be displayed if the selected date is within the month of June.
This field will be displayed if the selected date falls on the 5th day of every month.
This field will be displayed if the selected date is within the year of 2018.

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.

gp-conditional-logic-dates-afterThis field will be displayed if the time selected in the Time field is greater than 12:00 pm
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.

time-based-conditional-logic-morning-optionsThis field will be displayed if the current time is before 12:00 pm

Check out our How to Setup Time-based Conditional Logic for Gravity Forms the Easy Way tutorial for a detailed walkthrough.

Hooks

Leave A Comment

9 + 10 =

Write a Review

Select Currency

Download Details

$7.90
BUY NOW
0 Sale
0 Comment
( 0 Rating )

Download Information

Released
:
May 23, 2021
Updated
:
May 18, 2022
Price
:
$7.90
Categories
:
Sales
:
0 Sale

Report Content

Get Email Update Alerts

Subscribe to Newsletter

Payments Accepted

paypalstripevisamaster carddiscover