Hidden form field date set to 'now' | Community
Skip to main content
May 19, 2014
Solved

Hidden form field date set to 'now'

  • May 19, 2014
  • 3 replies
  • 1647 views
I have a hidden form field set as datetime.

How do I set this? e.g. on submit, set hidden field to now
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
Hi David,
like that. It sets a timestamp with the current system time:



But you should test it if it works in a form. Never tested it myself otherwise you can just build a Smart Campaign which triggers form submits and sets the datetime with the parameter, or you could use JavaScript. Maybe a other person tested it and can tell you which solution you should choose.

Best regards

Steffen

3 replies

May 19, 2014
Hi David,
{{system.dateTime}} sets the current system time. Or what do you mean with setting field to "now"?

Best regards

Steffen
May 19, 2014
So I created a timestamp custom field e.g. 'TOS Timestamp'

With this field, I want to capture the time a user approves TOS (Terms of Service) - just a checkbox on the form. Note user cant submit without checking, so there is no need for any checks.

I created a form and added the hidden field (timestamp); however, I dont know how to set it to the time of submission.
Accepted solution
May 19, 2014
Hi David,
like that. It sets a timestamp with the current system time:



But you should test it if it works in a form. Never tested it myself otherwise you can just build a Smart Campaign which triggers form submits and sets the datetime with the parameter, or you could use JavaScript. Maybe a other person tested it and can tell you which solution you should choose.

Best regards

Steffen