geoffdude Posted March 12, 2018 Report Share Posted March 12, 2018 Hi all, I have a form with 40 radio buttons (single, but grouped) for 20 questions, with 2 radio buttons for each question. I want to disable submit button on my form UNTIL at least 10 radio buttons are selected (10 questions). I have a div with a messsage "10 Votes Are Required" that shows until 10 radio buttons are selected in the button area, then it turns off and the submit button turns on.. or, at least I want it to after 10 votes are picked. This is what I have so far: <script language="JavaScript"> document.getElementById("Submit").style.display = 'none'; $( "input:radio" ).on( "click", function() { if($( "input:radio:checked" ).length >= 2) { document.getElementById("Submit").style.display = 'block'; document.getElementById("votepromptmsg").style.display = 'none'; } else { document.getElementById("Submit").style.display = 'none'; document.getElementById("votepromptmsg").style.display = 'block'; } }); </script> The code above works on some levels.. but I can't get it to fully do what I want. Any ideas, or insight, on how to get the code working would be very appreciated. Thanks, Geoff Quote Link to comment Share on other sites More sharing options...
MayMusic Posted April 10, 2018 Report Share Posted April 10, 2018 How is the table setting? Can you provide the URL to the page? 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.