Viewing 5 replies - 1 through 5 (of 5 total)
  • The menu item from “Generate Tag” doesn’t appear to work but you can use at least one instance of the checkmail in your form. The default value seems to be checkmail-10.

    I have successfully used this in my form:

    Email Address:
    [email* your-EMAIL]
    Confirm Email:
    [checkmail checkmail-10 “your-EMAIL”]

    Hope that helps you.

    Doesn’t work for me – I keep getting the message “Email address seems invalid.” – even when I cut and paste from the first entry.

    What a pity – it’s a much-needed function.

    Just in case anyone else finds their way here, I have managed to get this ~hopefully~ working on a site.

    In the source for this plugin (Plugins -> Editor -> Select plugin to edit -> Checkmail Validation for Contact Form 7) I have changed the function wpcf7_checkmail_validation_filter to the code below:

    function wpcf7_checkmail_validation_filter( $result, $tag ) {
    $type = $tag['type'];
    $name = $tag['name'];
    $values = $tag['values'];
    $_POST[$name] = trim( strtr( (string) $_POST[$name], "\n", " " ) );
    if ( 'checkmail' == $type ) {
    if ( '' == $_POST['checkmail_'.$name] ) {
    $result->invalidate($tag, wpcf7_get_message("invalid_required"));
    } elseif ( $_POST['checkmail_'.$name] != $_POST[$values[0]] ) {
    $result->invalidate($tag, wpcf7_get_message("invalid_email"));
    }
    }
    return $result;
    }

    It seems that the WPCF7 API changed or something, I don’t know. But after making this change the plugin works on my WP 4.1 install.

    Edit: Here’s a link to a gist that’s a bit easier to read: https://gist.github.com/Riccobab/31841497978a89b873f1#file-wpcf7_checkmail_validation_filter-php

    tgwelch

    (@tgwelch)

    Thanks, Riccobab.

    Worked for me in 4.1.1. Make sure to put the email tag in quotes as in principalskimmer’s example: [checkmail checkmail-10 “your-EMAIL”].

    Didn’t work properly until I did that.

    Thanks! Worked for me on 4.2.2

    the tag [checkmail checkmail-10 “your-EMAIL”] is case sensitive, if your tag is “your-email” then the entire tag should look like this: [checkmail checkmail-10 “your-email”]

    Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘doesn't work in WordPress 3.9’ is closed to new replies.