Hi,
Can anyone help me?
I have a very simple form which has just 2 fields, (tracker_1 and name_1) and a submit button which saves to a database and redirects the user after submit.
My problem is that I require to run a small custom code within the form to produce a ten digit number. I can get it to work and display the result of the custom code at the start of the form but what I want is for the result to be displayed within the (tracker_1) field instead.
Any ideas?
This is the custom code:
Can anyone suggest how to load it into the tracker_1 field instead of displaying it as above.
Can anyone help me?
I have a very simple form which has just 2 fields, (tracker_1 and name_1) and a submit button which saves to a database and redirects the user after submit.
My problem is that I require to run a small custom code within the form to produce a ten digit number. I can get it to work and display the result of the custom code at the start of the form but what I want is for the result to be displayed within the (tracker_1) field instead.
Any ideas?
This is the custom code:
<!DOCTYPE html>
<html>
<style type="text/css">
#demo {text-align: center}
</style>
<body>
<p id="demo">Your Tracker Code Is<br>
<script>
document.write( Math.floor((Math.random()*10000000000)+1) );
</script>
</p>
</body>
</html>
Can anyone suggest how to load it into the tracker_1 field instead of displaying it as above.