Thank you Ray.
Adding that to the dynamic select Server Behaviour, for the country field, seems to have done the trick and I've added it for the various region field options too but, because when the validation fails the page effectively reloads, it's not recalling the onChange behaviour that would have been initiated on the first submission of the form by the user selecting either the US or UK - both of which call dynamic sub-dependent drop-down menus.
Thankfully it does recall the State name and displays it, when validation fails, but if you'd selected, for example, the US you would usually be shown a drop down menu of states. When validation fails, you are just shown a standard input field. It's not ideal but to change it I'd need to look at the whole onChange behaviour which is currently this:
<script>
$("#Country").change(function() {
if ( $(this).val() == 425) {
$("#RegionsUS").hide();
document.getElementById('RegionsUS').disabled = true;
$("#RegionsOTHER").hide();
document.getElementById('RegionsOTHER').disabled = true;
$("#RegionsUK").show();
document.getElementById('RegionsUK').disabled = false;
}
else if ( $(this).val() == 426) {
$("#RegionsUS").show();
document.getElementById('RegionsUS').disabled = false;
$("#RegionsOTHER").hide();
document.getElementById('RegionsOTHER').disabled = true;
$("#RegionsUK").hide();
document.getElementById('RegionsUK').disabled = true;
}
else {
$("#RegionsOTHER").show();
document.getElementById('RegionsOTHER').disabled = false;
$("#RegionsUS").hide();
document.getElementById('RegionsUS').disabled = true;
$("#RegionsUK").hide();
document.getElementById('RegionsUK').disabled = true;
}
});
</script>
Is there any way of simplifying the WA jQuery Client Form Validation? The speech bubbles aren't mobile compatible and there are simpler ways of displaying the error, for example highlighting the input field in red with a small text message below it.
Thank you.
NJ