I am struggling to enter the form if the the div is not loaded, What I am trying is if the option "Grade B or Less" is selected then form should be able to submit and if "Grade A" is selected then next div to be loaded and then form to be submitted,
Here is my php form
I am able to do it with Grade A but If Grade B is selected I am not able to submit the form, Please advice
CodePudding user response:
This is because your radio input with name="function"
has the required
attribute set. Despite not being visible, the form is still expecting this field to be completed.
The simplest solution here would be to either remove the required
attribute or consider setting one of the options as checked
by default.