srufini Posted December 9, 2014 Report Share Posted December 9, 2014 I have 4 person that must approve the record and I have manged to create a datapage where a specific user can see and check only the document and only the check where his name is there. What I cannot manage to make it work is the timestamp as explained in this forum page: http://forums.caspio.com/index.php/topic/3567-how-do-you-timestamp-when-the-checkbox-is-checked/ <SCRIPT LANGUAGE="JavaScript"> function setTime(){ var v_chk=document.getElementById('InsertRecordFileName').checked; if(v_chk==true) { document.getElementById("InsertRecordFileName").value="[@cbTimestamp]"; } } document.getElementById("caspioform").onsubmit=setTime; </SCRIPT> First, I am not sure of the ' ' instead of the" ". Then I am not sure of the onsubmit, or onchange that I should use. ( The form is originally submitted in another page) I used to have a Yes/No type for my field QA_Approval, now I changed to Text fiedl as described in the topic above. Simply nothing happens when I follow the explanation above. I noticed that it would be great if I could simply put [@cbTimestamp] in the "value when checked" field of the Configure Page Field page. Any suggestion?Thanks Sergio Quote Link to comment Share on other sites More sharing options...
srufini Posted December 9, 2014 Author Report Share Posted December 9, 2014 Solved. <script> document.getElementById('EditRecordQA_Approval').onclick= function () {document.getElementById('EditRecordQA_Approval').value = "[@cbtimestamp]"} document.getElementById('EditRecordQA_expert_Approval').onclick= function () {document.getElementById('EditRecordQA_expert_Approval').value = "[@cbtimestamp]"} document.getElementById('EditRecordSubsystem_Approval').onclick= function () {document.getElementById('EditRecordSubsystem_Approval').value = "[@cbtimestamp]"} document.getElementById('EditRecordPM_Approval').onclick= function () {document.getElementById('EditRecordPM_Approval').value = "[@cbtimestamp]"} </script> 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.