Hi @paulbarrett1952
I hope you’re well today and I’m sorry for misunderstanding on our end.
Forminator doesn’t have (yet) built-in option to compare e-mail fields but you can achieve it with a bit of additional custom code. This should work just fine:
https://gist.github.com/adczk/409dba81b8131e21660a39e15f5f5d21#file-forminator-compare-email-fields-php
You can use it as MU plugin on site and you may need to adjust field IDs in code to match your form but other than this, it should do the trick if it comes to field comparison.
It won’t prevent “copy-pasting” though. That would require additional code, JS based this time. You can add it in the same MU plugin too (again, you’ll need to adjust fields ID – this time they are CSS IDs – to match the form):
add_action( 'wp_footer', 'my_form_prevent_paste', 99 );
function my_form_prevent_paste() {
ob_start();
?>
<script>
( function( $ ) {
$( document ).ready( function() {
$( '#forminator-field-email-1' ).on( 'cut copy paste', function( e ) {
e.preventDefault();
});
$( '#forminator-field-email-2' ).on( 'cut copy paste', function( e ) {
e.preventDefault();
});
});
} ( jQuery ) );
</script>
<?php
$scripts = ob_get_clean();
echo $scripts;
}
Best regards,
Adam