<script>
var dt = new Date();
var time = dt.getTime();
//document.write(time);
$( document ).ready(function() {
// after the page elements are all loaded, then run the script
$("#name").val(time);
});
</script>
And then changed the ID of my regular input form field. Like so:
Hey all! For anyone still looking to have a functioning hidden timestamp field on their Webflow form, a friend of mine edited the above javascript from Sebastian and included a timezone snippet to convert the timestamp to any timezone needed (so you don’t get form submissions from the user’s timezone).
<script>
var dt = new Date().toLocaleString("en-US", {timeZone: "America/Chicago"});
$( document ).ready(function() {
// after the page elements are all loaded, then run the script
$("#timeStampID").val(dt);
});
</script>
Once you put that code in the tag of a specific page or add it to the Custom Code section in settings, you then add a text field to your form, set the name/ID to be timeStampID like Sebastian mentioned and set the field to display: none. That should do it, I tested this out in Zapier across different timezones and it worked flawlessly! Hope this helps anyone looking to integrate this