Darina Posted January 29, 2014 Report Share Posted January 29, 2014 I have six checkboxes on my Submission Form. I want the user to check one of the checkbox before clicking Submit. The user will not be able to submit the form unless either one of the 6 checkboxes is checked. Thanks Quote Link to comment Share on other sites More sharing options...
HongTaiLang Posted January 29, 2014 Report Share Posted January 29, 2014 Please try the following code in the footer of that DataPage: <script> function chk_fields(){ var chk1 = document.getElementById("InsertRecordFieldName1"); var chk2 = document.getElementById("InsertRecordFieldName2"); var chk3 = document.getElementById("InsertRecordFieldName3"); var chk4 = document.getElementById("InsertRecordFieldName4"); var chk5 = document.getElementById("InsertRecordFieldName5"); var chk6 = document.getElementById("InsertRecordFieldName6"); if ( chk1.checked == false && chk2.checked == false && chk3.checked == false && chk4.checked == false && chk5.checked == false && chk6.checked == false) { alert('check one checkbox'); return false; } } document.getElementById('caspioform').onsubmit=chk_fields; </script> Remember to replace the InsertRecordFieldNames. 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.