PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

User Notification during specific hours

  1. Hi There,

    Is it at all possible to set it up so that the user notification is sent only between say... 10pm and 10am?

    I like to make sure to reply to my inquiries quickly, however when I get one at midnight and I can't reply to it, I'd like to have the form send an auto reply saying that we received their e-mail and will reply in the morning etc etc...

    Thanks,
    Nick

    Posted 11 years ago on Friday June 8, 2012 | Permalink
  2. You can use the hooks which are built in to Gravity Forms to suppress the user notification based on the time of day. But it does not sound like that is what you really want? Do you want a different notification based on the time of day?

    If you want to suppress the notification, you can use the gform_disable_user_notification filter:
    http://www.gravityhelp.com/documentation/page/Gform_disable_user_notification

    If you want to modify the email notification which is sent, you can use the gform_autoresponder_email filter:
    http://www.gravityhelp.com/documentation/page/Gform_autoresponder_email

    If you can explain exactly what you'd like to do, we can give you more specific assistance.

    Posted 11 years ago on Monday June 11, 2012 | Permalink
  3. Basically What I want to do is have no notification go out during the day, but at night, if someone uses our form, I want a notification to go to them.

    Posted 11 years ago on Monday June 11, 2012 | Permalink
  4. OK, got it. So, you will set up the notification in the form builder. Then you need to prevent that notification from going out between 10:00AM and 10:00PM (when you will respond promptly instead.)

    Try this code to disable the notification between the hours of 10:00 and 22:00.

    http://pastebin.com/nmvcdB1K

    The time used is server local time, so you might need to adjust it if you're not in the same timezone as the server. The time returned on the command line was different than that code which was returned by the script, so you might have to fiddle with this a little bit.

    Posted 11 years ago on Tuesday June 26, 2012 | Permalink