Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Time & Date Stamp when sent

Avatar

Level 2

I would like to create a function that would time & date stamp my form at the time it's being sent.  I have a button designed to e-mail the PDF to a specific e-mail inbox.  Is there a way to time & date stamp this form at the time the individual presses the Send button on the form?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member
10 Replies

Avatar

Former Community Member

Is the Date and Time to appear in the subject of the email or is it just a field on the form?

Paul

Avatar

Level 2

I would like the date/time stamp to appear on the form.  Also, if the time would be formatted in 24 hrs., it would be very helpful.

Avatar

Former Community Member

So you woudl hide the submit button that you are using to send the email (I will call this Submit). Then I woudl place a regular button onto the form and name it appropraitely for the user to understand that this is th esubmit button that they should press. There are functions in both Javascrip and formcalc that will return to you the current date and time (you can ask for whatever format you want). So your buttons click event will call those functions, place the results in the field that you want to hold them then hit the hidden submt button by using this code:

hidden button name.execEvent("click");

Hope that helps

Paul

Avatar

Level 2

Would you be able to provide an attachment with an example?

I am stil attempting to learn FormCalc & Javascript, and have a long way to go.

Thank you!

Avatar

Former Community Member

I will need an email address to send to ....attachments on the forum have been temporarily disabled.

Paul

Avatar

Level 2

My e-mail is:

Robert.gallagher@p-h-s.com

Or, just reply to this e-mail.

Thank you!

Robert Gallagher

Safety/Env. Officer, PHS

206-766-7040

Avatar

Correct answer by
Former Community Member

Just sent it

Paul

Avatar

Level 2

Thank you!

Is there a way to format the "Time" as military, or 24 hour time?

Robert Gallagher

Safety/Env. Officer, PHS

206-766-7040

Avatar

Former Community Member

Hello Paul,

I would like to do something similar to Robert did in this forum. Is the attachment available now? If so can you please upload a sample file. If not, can I please have a copy of it. Please provide your email as I do not want to post my email here.

Thanks a lot in advance,

Han Dao

Avatar

Former Community Member

I do not have that file any longer ..... I would hav edeleted it after sending it as it was his form and not mine.

If you want to send yours to LiveCycle8@gmail.com I can probably rig something together for you. Include a description of your issue in the email please.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----