I’m trying to populate a Formstack hidden field that has an ID #filed123 (embedded on a html page using javascript) with a variable identified as tS.
Any ideas on what javascript i can use to do this? My problem is that it needs to pre-populate the field only after the DOM is ready and the form has been loaded.
Thanks in advance!
Current Code:
<script type="text/javascript">
var tS = +new Date;
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#field16955312').val(tS);
});
</script>
Try this, Assuming the field is textbox
With Javascript
With jQuery