wgalliance Posted May 18, 2016 Report Share Posted May 18, 2016 I would like to include javascript on several datapages where upon submission or update of that particular page it will change a form field value from No to Yes. I have a multi-step process with 8 different datapages. I want to be able to see which portions have been "completed." Thus requiring me to have a yes/no checkbox for each section (i.e. datapage). After page 1 is submitted, I want that yes/no checkbox to be checked to "Yes", the field is hidden in the datapage. Thanks in advance for any input! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted May 23, 2016 Report Share Posted May 23, 2016 You can have a script that calls a function on submit to check the box <script> document.getElementById('caspioform').onsubmit = function (){ document.getElementById('CHECKBOXID').checked="True"; } </script> Code can go to the footer of the page and "CHECKBOXID" needs to be replaced with actual element ID. lmooring 1 Quote Link to comment Share on other sites More sharing options...
JoshuaJobin Posted June 6, 2017 Report Share Posted June 6, 2017 I am using this with an autosubmit. But, I am changing the YES/NO value before submit, rather than onsubmit. Much like: <script> document.getElementById('CHECKBOXID').checked="True"; document.getElementById('caspioform').submit; </script> I also have a 10 second delay (using setTimeout) in between the value change and submission. This doesn't seem to work for me. Any idea? EDIT: I was able to use this and it worked: document.getElementById('CHECKBOXID').value="Y"; 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.