Jump to content

Struggling to timestamp a field based on a value of a checkbox


Recommended Posts

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

Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...