Solved! Go to Solution.
Hello.
I'm embedded a forms 2.0 form on my website and {{system.dateTime}} as a hidden field isn't working. In Marketo, instead of showing the date/time stamp, it shows "{{system.dateTime}}".
Any ideas as to why and how to fix?
Adam - curious to know why we can't just embed it, seems easier but doesn't work!
Don't know what Adam was getting at, save for the fact that the token won't work on non-Marketo pages.
You can -- and, in my opinion, should -- add the timestamp in the browser. The less your server has to do, the better.
MktoForms2.whenReady(function(form){
form.onSubmit(function(form){
form.addHiddenFields({
"lastFormSubmit" : new Date().toISOString()
});
});
});
Of course "lastFormSubmit" should be replaced with the name of the field in your instance.
The only liability -- if you can call it that -- is that a malicious person could forge the submission date, while in the flow it'll always stamp the real date. Why that hack, of all things, would be what bad guy would choose to do escapes me.