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.

Add Entry Date to Notification?

  1. Hi there,

    I would like to include the full datetime stamp in a notification email. I see that I can add the date as a merge field, but not the time. Is there a way to get the full entry date/time? It seems like this should be simple, but I'm not seeing it.

    Posted 11 years ago on Friday December 28, 2012 | Permalink
  2. David Peralty

    There currently isn't a timestamp feature in Gravity Forms to include the time. This has been requested a few times recently, and has made our list of features to be investigated further. For now, you can include a hidden field, and using some PHP add the time to that field, and include it in your e-mail if you would like. Let me know if you need some more details on how to do that.

    Posted 11 years ago on Friday December 28, 2012 | Permalink
  3. Hi David,
    More info would be great. I read up on the hook, but I'm not sure where exactly to add the function.

    Thanks!
    Megan

    Posted 11 years ago on Friday December 28, 2012 | Permalink
  4. David Peralty

    So you would put the custom code in your theme's functions.php file. You would add the PHP datetime value you want to the field using the gform_field_value hook.

    http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name

    Not sure how you've hidden this field. I recommend using CSS to hide the time field so it is easier to add to the notification as hidden fields by default aren't sent through the notification system. To do this, just add a normal input field and give it a CSS class of gf_hidden and then in your theme's CSS add .gf_hidden { display: none; }

    All my best!

    Posted 11 years ago on Friday December 28, 2012 | Permalink
  5. Hey! I totally got that to work! Thank you so much for the help!

    Unfortunately, I don't think it'll work for what I need it to do. We are going to be assigning registration order by the entry date/time stamp. The submission date/time is different enough (by milliseconds) from the entry date/time, that I think it will introduce confusion for our admins. Oh well..wish I could just capture that entry dt and spit it out! :)

    Megan

    Posted 11 years ago on Friday December 28, 2012 | Permalink
  6. The entry ID is sequential and in the order in which the form was submitted. Can you base your registration order on the entry ID? Entry 67 will have been created before entry 68, etc.

    Posted 11 years ago on Saturday December 29, 2012 | Permalink
  7. marindee
    Member

    I'm trying to add a Date/Time stamp to my entries as well. I looked at the functions.php code on the link above, but I can't figure out how to add a pre-populated date and timestamp to my form's notification email. I also need to add a prefix of the date and time to the file that is uploaded. Can anyone help me on how to do this?

    Posted 11 years ago on Monday January 14, 2013 | Permalink
  8. David Peralty

    With that level of customization and code required, it might be best for you to hire a developer to help do all of those things. We have a Job Board on this forum, and recommend sites like jobs.wordpress.net.

    Posted 11 years ago on Monday January 14, 2013 | Permalink