Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author DeveloperWil

    (@developerwil)

    Can you explain further what message and what you’d like it changed to?

    Wil.

    Thread Starter Emilio Valdés Reyes

    (@emiliovaldes88)

    Hi,

    My intention is to use the blacklist plugin to block the sending of forms to people who use non-professional email domains, such as gmail.com, yahoo.com, hotmail.com, etc…

    The original message that appears is the following: Sorry, @gmail is blocked for this form. Try another email address.

    And I need to change it to: Sorry, only professional email addresses are allowed.

    I am not an experienced php developer but reviewing the plugin source code I have realized that this message can be changed on line 103, but if I make a change in this way, I would lose it with future plugin updates.

    Therefore, it would be very convenient to be able to have a field in the form editor itself that allows inserting the message that appears.

    Plugin Author DeveloperWil

    (@developerwil)

    I have released v1.1.1 with an added filter so that you can change the error code yourself.

    Update to version 1.1.1 then add the following code in a code snippets plugin or your child theme’s functions.php file.

    add_filter( 'elementor_forms_blacklist_error_message_blocked', function( $error_message, $blocked_email ) {
    return sprintf( 'Custom Error: The email or domain %s is not allowed.', $blocked_email );
    }, 10, 2 );

    You can use the following variables to include in your custom error message.
    $error_message is the entire default error message.
    $blocked_email is the list of blocked emails the plugin found.

    Or, for your specific case you can use the following code:

    add_filter( 'elementor_forms_blacklist_error_message_blocked', function( $error_message, $blocked_email ) {
    return( 'Sorry, only professional email addresses are allowed.' );
    }, 10, 2 );

    • This reply was modified 1 year, 1 month ago by DeveloperWil.
    Thread Starter Emilio Valdés Reyes

    (@emiliovaldes88)

    Hello, thank you very much for the update.

    In the spirit of improving this plugin I would like to make some comments.

    It is true that the update offers a solution, but it is quite cumbersome for people who do not have medium knowledge of wordpress, since you have to use code in the function file or install a plugin that allows you to inject code.

    In my case I can achieve it, since I have the necessary knowledge, but I leave you the following recommendation that will improve the user experience.

    As you can see in the image, my idea is to put one more field in the form from which a personalized message is allowed to be entered. I have attached an image with the idea.

    In this way, each form will be able to have a different personalized message unlike the solution proposed in this update.

    https://ibb.co/hZ5SzV9

    Plugin Author DeveloperWil

    (@developerwil)

    Yes, that would be ideal. I’ll get round to that when I have some time.

    I’ve added it as a feature request on the GitHub repo https://github.com/DeveloperWil/Email-Blacklist-For-Elementor-Forms/issues/1

    Thanks,
    Wil.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Modify message’ is closed to new replies.