Having an issue with handling a checkbox button in a form using JavaScript. I've created a customer information collection form that includes basic details like first name, last name, email, etc., and at the end of the form, I've added a navigation tab panel with 2 options.
In option 1, it's mandatory to check the checkbox before submitting. So there are two possible cases:
Case 1: If the customer enters basic information and selects option 1, checks the checkbox, and hits submit, everything works fine.
Case 2: However, if the customer chooses option 2 without checking the checkbox in option 1, the submit button should be disabled (i.e., can't be pressed).
My question is: When the user goes for option [1], they have to check the checkbox to submit the form. But when they choose option 2, I don't want them to check the checkbox; instead, I want them to know how to submit the form.
Due to my extensive project code, I've used a W3C snippet as a reference example for clarification of my problem. Any assistance would be highly appreciated!