Working with a sign up form that can have conditional inputs. It is possible that the Country value is not always necessary when signing up. Is there a "conditional IF statement" through which I could do the form check? In otherwords, check signupForm.country.length only if Country is true. For context, below is the code where I am trying to implement the logic:
const submit_button_disabled =
!(agreeTerms
&& signupForm.email.length > 0
&& (signupForm.email == signupForm.email2)
// && (if countryRequired && signupForm.country.length > 0);
// check signupForm.country.length IF countryRequired