Like the subject says, is there a way to capture the date and time that the submit button is clicked and add that bit of data to the information being sent in the notification email? Not real savvy here with a lot of this stuff, so be gentle, lol.
Capture the Date and Time the Submit button is clicked - and putting that in the notification email?
Yes, you can use either {date_mdy} or {date_dmy} - youāll find both when you click on the āMerge Tagsā icon on the far right side of the notification message body field, or you can just type it in like shown.
Okay, I found that about twenty minutes before you responded, Trisha ā is there a corresponding field for the time? I hope? I donāt see anything in the dropdown list so hoping itās something that can be typed in?
Well, theoretically you could hook into one of the notification filters to modify the output of that merge tag to use a different PHP date() format that includes a timestamp, but thatās a bit over my head, so hopefully one of the developers will offer a better solution for you.
Iād also encourage you to submit a request to include timestamp in a Merge Tag option for a future update.
Iām sure youāre aware that the email itself has a timestamp that would - in most cases - be within a minute of the form submission time since those are generally sent immediately, but I can easily think of many uses where youād want that in the body of the email alsoā¦so it seems like a reasonable request.
Yeah, that first thing is over my head too, lol.
Iāll submit a request for it and hope the developers see this and have a solution.
Yeah, the email datetime stamp is there and is quasi working for what Iām doing but itās clunky and slows my whole process down to go back and look for it. Iām glad someone else thinks itād be useful in other cases. Thanks for your help and ideas, Trisha!
Iām late to the game here, but you can use the gform_replace_merge_tags
filter to give yourself an {entry_time}
merge tag, as shown in example 2 here:
Thanks Chris - I was actually able to use the merge tag {entry:date_created} by copying and pasting that tag from that entry into the notification and that works great, mostly. However, itās four hours ahead of the actual time (guessing itās on coordinated universal time?) and comes through as a link. Itās funny that the link goes to the {entry} Merge Tag - Gravity Forms Documentation page and if you take the link out? It doesnāt work.
So, while not entirely back to square one, itās a little bit of a setback. So, were I able to use that #2 entry you mentioned, a) where do I put that code and 2) how can I modify it to subtract four hours from the time? (if you know)