Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    • Documentation
    • Support
    • Account

How to Setup Time-based Conditional Logic for Gravity Forms the Easy Way

A point-and-click solution for creating conditional logic rules based on the current time. Works anywhere Gravity Forms conditional logic is supported (i.e. fields, confirmations, notifications, etc).

Last updated June 26, 2020 | Written by Jordan Smith 16 Comments

View Demo

This article requires the Gravity Forms Conditional Logic Dates perk. Buy Gravity Perks today to get this perk plus 33 other premium Gravity Forms plugins!

  • View the Plugin
  • Buy Gravity Perks

This tutorial will demonstrate how to show/hide fields via Gravity Forms’ conditional logic based on the current time. This functionality can be used anywhere conditional logic is available and is made available by the GP Conditional Logic Dates plugin.

Here are just a few examples of how this could be useful:

  1. Time-sensitive Submissions
    Allow a Gravity Form to only be submitted during a certain time of day.
  2. Time-dependent Confirmations & Notifications
    Display different confirmation messages or send specific notifications depending on the time of day the form is submitted.
  3. Time-responsive Fields
    Show or hide fields on your form depending on the time of day.

Ready to get started? Here we go!

Steps

  1. Install & activate GP Conditional Logic Dates.
  2. Add a time-based conditional logic rule.

1. Install & activate GP Conditional Logic Dates.

Install and activate GP Conditional Logic Dates.

2. Add a time-based conditional logic rule.

  1. Open your form in the Form Editor.
  2. Select the field for which you want to configure a time-based conditional logic rule.
  3. Click the “Advanced” tab.
  4. Click the “Enable Conditional Logic” setting.
  5. Select “Δ Current Time” from the first drop down which contains your form fields.
  6. Enter the time in the required format.
Time-based conditional logic must be entered in the 12-hour format.

That’s it! Your field will now show or hide depending on the specified time-based rule.

time-basted-conditional-logic-morning-optionsDisplay Morning Options before 12pm
time-basted-conditional-logic-afternoon-optionsDisplay Morning Options after 12pm

Did this resource help you do something awesome with Gravity Forms? Then you'll absolutely love Gravity Perks; a suite of 32+ essential add-ons for Gravity Forms with support you can count on.

  • View All Perks
  • Buy Gravity Perks

Filed Under: How To, Tutorials gp conditional logic dates

Comments

  1. Cel says

    December 1, 2020 at 7:18 am

    We want to set up a simple responder dependant on the “local” time of day, ie. 5:00pm GMT, but our visitors may be in different time zones. Is the time set by the client side or the server? is there a way to set the time to particular timezone?

    Reply
    • Samuel Bassah says

      December 1, 2020 at 9:35 am

      Hi Cel,

      GP Conditional Logic Dates uses the user’s local time based on their user profile, but if you’d prefer to set it based on UTC, we have a snippet for that. It automatically adjusts the user’s local time to UTC and then evaluates based on that.

      I hope this helps.

      Best,

  2. Bill Deputy says

    August 10, 2020 at 9:22 am

    I need to have users fill out a form stating someone’s birthday. 

If the birthday is too soon, I do not want them to be able to complete the form.



    I need to edit videos and a minimum of 4 days is required. They need to INVITE friends/family to upload videos which also requires at least 3 days. SO……. 



    When they answer the question of WHAT DATE the recipient’s BIRTHDAY is, I want to have the form automatically process the VIDEO UPLOAD DATE = (which is 4 days BEFORE the birthday) –

    and also have a date displayed for the minimum 3 days to INVITE friends/family to UPLOAD videos.

Can I do this with the Gravity Forms Conditional Logic Dates Add-on???

    Reply
  3. Perry says

    August 4, 2020 at 11:03 am

    Hello, We are caterers who offer ordering up until Thursday at 5pm for pickup on Sunday. We want to limit the available pickup dates based on that Thursday at 5pm cut off. Meaning, today is Tuesday, 8/4/2020. People can order food this week until Thursday, 8/4/2020 until 5pm for pick up on Sunday, 8/9/2020. We want to offer pickup times of Sunday in the future but no longer offer 8/9/2020 as a pick up time after Thursday at 5pm. Is that possible? (Did I ask the question so it makes sense?) Thank you! – Perry SIOD

    Reply
    • Samuel Bassah says

      August 4, 2020 at 11:49 am

      Hi Perry,

      This is quite an interesting use case, which I would guess should be possible with a combination of our GP Conditional Logic Date and GP Limit Dates Perks. If you’re a Gravity Perk Customer, you can send us a message via our support form with an attachment of the form export so we can get a better picture of your setup and assist you further.

      Best,

  4. Alex says

    November 12, 2019 at 9:22 am

    Hi,

    Does it work for time frames? For example for 9-5 to enable one condition and >5 and <9 to enable a different one.

    Cheers

    Reply
    • David Smith says

      November 15, 2019 at 12:51 pm

      Hi Alex, yup, here’s an example of showing a field between 9am and 5pm (https://gwiz.io/2NRCVQe) and here’s an example of showing a field before and after hours (https://gwiz.io/2OjXuDS).

  5. Michael Ha says

    June 26, 2018 at 6:37 pm

    I tried installing this plugin Gravity Forms 2.3.2 and WordPress 4.9.6 but it doesn’t work.

    Reply
    • Michael Ha says

      June 26, 2018 at 6:59 pm

      Oh never mind I figured this out. I didn’t “activate” the perk.

    • David Smith says

      June 26, 2018 at 8:23 pm

      Happy to hear you were able to get this working. :)

  6. Lena says

    November 21, 2017 at 3:29 pm

    Can this be used to send the form to different people based on time of day? For instance? – Between 9-5 form is emailed to Bob. – After 5 and before 9, email is sent to Sally.

    Would this work?

    Reply
  7. Yassine Chebabi says

    September 18, 2017 at 11:56 am

    How to to a age check for example 18 years and older?

    Reply
    • David Smith says

      September 18, 2017 at 9:58 pm

      Our best solution is the GP Date Time Calculator plugin that is available as an early access perk with our Gravity Perks plugin suite. It provides an “:age” merge tag so you can just put it in your formula like so: {Date of Birth:2:age}. If you’d like to try it out pick up a copy of Gravity Perks and drop us a line via support.

  8. Michael says

    January 19, 2017 at 2:11 pm

    Essentially trying to get a field to display on a weekday BEFORE and AFTER business hours and not during normal business hours. I’ve successfully gotten my {monday}-{friday} types of tags working from your conditional date plugin. I’m just running into a roadblock trying to get this logic to work out someway.

    Here’s What I have for the field I’m trying to hide or display:

    [Show] this field if [All] of the following match: Current Time is [Less Than] 07:00am Current Time is [Greater Than] 04:00pm Today [isnot] {Saturday} Today [isnot] {Saturday}

    Any help on how to get this done would be much appreciated!

    Reply
    • baljeet says

      August 15, 2017 at 12:16 am

      I am using “Beta version” of GP Conditional Logic Dates but i did not get “current time” option in that. Also its not working with week names like i want to open my salon from Monday to Friday so don’t want to book any entry for Saturday and Sunday

    • David Smith says

      August 17, 2017 at 10:57 am

      Hi Baljeet, please submit a support request and we’ll be happy to help.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

  • How To (63)
  • News (21)
  • Plugins (14)
  • Releases (7)
  • Resource (3)
  • Snippets (58)
  • Tutorials (57)
  • Updates (104)

Recent Posts

  • How to Update Posts with Gravity Forms
  • Gravity Wiz Weekly #104
  • The Complete Guide to Using Gravity Forms With Zapier
  • Gravity Wiz Weekly #103
  • Show Active Forms by Default on Form List

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2021 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Gravity Perks
    ▼
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    ▼
    • Documentation
    • Support
    • Account