I have a registration form that checks to see if he/she is a customer of ours. If the user selects yes, then two fields are displayed (customer number and zipcode). However, if the user selects no, i want the form to just send and go to the next page.
As it works right now, when the user selects no, the form errors out when trying to submit because the customer number + and zipcode is left blank.
What is the best approach to redirect a form on radio button selection? Or is it possible to pre-fill the customer number + zipcdoe fields if the user selects no? Is there a workable way to redirect this?
My radio button code:
Yes <input type="radio" onclick="javascript:yesnoCheck();" name="yesno" id="yesCheck"> No <input type="radio" onclick="javascript:yesnoCheck();" name="yesno" id="noCheck" onChange="OnChangeForm" value="epc">
JSFiddle: https://jsfiddle.net/7ycha0ge/