This is a filter, so it will live inside the theme file?
Since I use
<div class=”one-half first”>[text* fname placeholder “First Name*”]</div>
<div class=”one-half”>[text* lname placeholder “Last Name*”]</div>
I can’t test for a type, it’s just text?
add_filter( ‘wpcf7_validate_text*’, ‘name_validation_filter’, 20, 2 );
function name_validation_filter( $result, $tag ) {
if ( ‘fname’ == $tag->name ) {
if ( $_POST[‘fname’] == $_POST[‘lname’] ) {
$result->invalidate( $tag, “Are you sure this is the correct address?” );
}
}
return $result;
}
This will give an eerr msg, whereas the discussion spam words will just make the msg disappear right?
-
This reply was modified 3 years, 11 months ago by blazmate.
-
This reply was modified 3 years, 11 months ago by blazmate.