SOLVED

Re: Hidden form field date set to 'now'

Go to solution
Anonymous
Not applicable

Hidden form field date set to 'now'

I have a hidden form field set as datetime.

How do I set this? e.g. on submit, set hidden field to now
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Hidden form field date set to 'now'

Hi David,
like that. It sets a timestamp with the current system time:

0EM50000000RsfZ.jpg

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Re: Hidden form field date set to 'now'

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

Best regards

Steffen
Anonymous
Not applicable

Re: Hidden form field date set to 'now'

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.
Anonymous
Not applicable

Re: Hidden form field date set to 'now'

Hi David,
like that. It sets a timestamp with the current system time:

0EM50000000RsfZ.jpg

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