Okay, I created a form with email and confirm-email fields. Made both required:
$WAFV_Errors .= WAValidateEM((isset($_POST["email_address"])?$_POST["email_address"]:"") . "",true,3);
$WAFV_Errors .= WAValidateRQ((isset($_POST["email_confirm"])?$_POST["email_confirm"]:"") . "",true,4);
Then I created a validation to make them match (I think):
$WAFV_Errors .= WAValidateLE(((isset($_POST["email_address"]))?$_POST["email_address"]:"") . "",((isset($_POST["email_confirm"]))?$_POST["email_confirm"]:"") . "",true,12);
And under the confirm email field there's the original show-if validation:
<?php
if (ValidatedField('contactpublicrecords','contactpublicrecords')) {
if ((strpos((",".ValidatedField("contactpublicrecords","contactpublicrecords").","), "," . "4" . ",") !== false || "4" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="email_confirm_ServerError">Please retype your email address</span>
<?php //WAFV_Conditional contact_public_records.php contactpublicrecords(4:)
}
}
}?>
If I delete the confirm-email required line (#4) and, in the show-if validation code change 4 to 12, will that make it work? I mean, it works now but if the email addresses don't match, there's no pop-up -- the form page just reappears with no error message.
I've attached the page (you just looked at it for another thread).