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

Can a today's date be added in a date field when the submit button is pressed?

Avatar

Level 3

I created a form with a submit button and the form is sent via email.  Can the date when the form is submitted show up in a date field with the button is pressed?


Any help with this is much appreciated. Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

there is a preSubmit event for form objects you can use.

Select your date field, open the script editor and add this script (language is FormCalc) into the preSubmit event.

$ = num2date(date(), "MM/DD/YYYY")

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

there is a preSubmit event for form objects you can use.

Select your date field, open the script editor and add this script (language is FormCalc) into the preSubmit event.

$ = num2date(date(), "MM/DD/YYYY")

Avatar

Level 3

Thank you for this it helped me out a lot.