For #2 If Australia is selected in the required Country selectbox, show Australian States select box and make this required, else show nothing / require nothing...
I am trying something like this in jquery:
$('#stateAU').hide();
$('#country').bind('change', function (e) {
if( $('#country').val() == 'AU') {
$('#state-au').attr('eform','Australian State::1');
$('#stateAU').slideToggle('fast');
}
else {
$('#state-au').removeAttr('eform');
$('#stateAU').hide();
}
}).trigger('change');
but eform does not seem to listen to the jquery to make "#state-au" a required field
FYI: The html for the state select box looks like so...
<div id="stateAU" class="row selectHider">
<label class="spacer">Australian State*</label>
<div class="row opt">
<select id="state-au" name="state-au">
<option disabled selected hidden value=""> -- select an option -- </option>
<option value="ACT">ACT</option>
<option value="NSW">NSW</option>
<option value="NT">NT</option>
<option value="QLD">QLD</option>
<option value="SA">SA</option>
<option value="TAS">TAS</option>
<option value="VIC">VIC</option>
<option value="WA">WA</option>
</select>
</div>
</div>
Any ideas?
[ed. note: nickf08 last edited this post 6 years, 11 months ago.]