02/15/2019 at 9:26 am
#484727
Keymaster
****@ Janet**
Well, I know you will need the pattern and the required attribute.
You also have to update the javascript to include form validation. Something like what is discussed in the SO answer as basic but should be enough:
https://stackoverflow.com/a/17865293/5351316
Off the top of my head, maybe this would work:
$('#cn-cat-select').submit(function() {
if ( $.trim($("#cnmcs-address-input").val()) === "" ) {
alert('You did not fill out the postcode field.');
return false;
}
});
Hope this helps!
