AFFDEV Posted April 25, 2017 Report Share Posted April 25, 2017 Good Day Everyone, I am trying to timestamp a field if a checkbox is ticked. I am using the following code. <SCRIPT> function Updatetocasd() { if (document.getElementById("EditRecordccasd").checked==true) { document.getElementById("EditRecordtocasd").value="[@cbTimestamp*]"; } document.getElementById("caspioform").onsubmit = Updatetocasd; </SCRIPT> But it is not doing anything. Please help Quote Link to comment Share on other sites More sharing options...
Mathilda Posted April 25, 2017 Report Share Posted April 25, 2017 4 hours ago, AFFDEV said: Good Day Everyone, I am trying to timestamp a field if a checkbox is ticked. I am using the following code. <SCRIPT> function Updatetocasd() { if (document.getElementById("EditRecordccasd").checked==true) { document.getElementById("EditRecordtocasd").value="[@cbTimestamp*]"; } document.getElementById("caspioform").onsubmit = Updatetocasd; </SCRIPT> But it is not doing anything. Please help I see that one closing curly bracket } is missing. Try adding closing curly bracket before this line: document.getElementById("caspioform").onsubmit = Updatetocasd; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.