• Resolved pb52

    (@paulbarrett1952)


    I use the Pro version via my host bu thought I’d ask here….

    Validate email works well in that it cehcks for obvious tld errors etc but an address can pass all checks and still be non-deliverable

    Many sites overcome this by asking the user to enter their email twice and not allowing copy and paste between the two fields. Can that be done on Forminator Pro and if so how? If not, can that be added as a feature request please?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @paulbarrett1952

    I hope you are doing good today.

    There is no way to copy the password in the password field in Forminator and you need to always re-type it if “Confirm Password” is enabled?

    Could you let us know, how and in which browser you’re able to copy the password from the password field?

    Also, if you have the Pro version, we suggest using our forum, where we have more tools that will allow us to review your cases faster.

    Kind Regards,
    Kris

    Thread Starter pb52

    (@paulbarrett1952)

    Hi Kris

    Where is the “Confirm password” option? If it exists it’s exactly what I need but I can’t see it.

    Pro is supplied by my host so I’ll need to ask them to submit an enquiry on the forum

    Thread Starter pb52

    (@paulbarrett1952)

    “Confirm password?” No I meant “Confirm email address” when completing a form

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    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

    Thread Starter pb52

    (@paulbarrett1952)

    Wow. Thanks Adam

    We already use the code snippets plugin. Can I add this code there to avoid adding another plugin? We already have more than I would prefer

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @paulbarrett1952

    In general, it will be good to keep that code in a separate file, in case you will remove some mu-plugin and this will also remove this code.

    Kind Regards,
    Kris

    Thread Starter pb52

    (@paulbarrett1952)

    Adam/Kris

    Thank you for your help. Your instructions were so explicit that even asa numpoty user with no php experience. I was able to make it work first time!

    Brilliant.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Validatre email’ is closed to new replies.