WordPress Contact Form 7 Duplicate Email Field Plugin

This plugin helps ensure users enter their email address correctly by requiring them to type it twice.

Plugin created 2025.06.19

How to Use This Plugin:

1 — Add plugin to WordPress Plugins.

    • Add .zip file “cf7-duplicate-email.zip” from your desktop (download the file via button on right)

2 — Activate the Plugin:

    • Go to your WordPress Admin Dashboard.
    • Navigate to “Plugins” > “Installed Plugins”.
    • Find “CF7 Duplicate Email Field” in the list and click “Activate”.
  •  

3 — Modify Your Contact Form 7 Form:

IMPORTANT

    • Go to “Contact” > “Contact Forms” in your WordPress Admin.
    • Edit the form where you want to add the duplicate email field.
    • In the “Form” tab, add two email fields. It’s crucial that one is named your-email and the other is your-email-confirm.

IMPORTANT. YOU MUST USE EXACTLY THESE SETTINGS IN THE FORM

Example Form Fields (in the “Form” tab):

HTML:—

<label> Your Email (required)
[email* your-email] </label>

<label> Confirm Email (required)
[email* your-email-confirm] </label>

[submit “Send”]

Important: Make sure your [email] fields are named your-email and your-email-confirm exactly.

4 — Customize the Validation Message (Optional): If you want to change the “Email fields do not match.” message, you can add and edit the following code to your theme’s functions.php file:

PHP

add_filter( 'cf7_duplicate_email_validation_message', 'my_custom_cf7_email_message' );
function my_custom_cf7_email_message() {
    return 'Oops! Your email addresses don\'t match. Please try again.';

Grab the plugin

Below is an example of the email input mismatch error message

example email input mismatch error message

backup with info user doesn’t need because I made the plugin from this info.

How to Use This Plugin:

  1. Create the Plugin File:
    • Create a new folder in your WordPress installation under wp-content/plugins/ called cf7-duplicate-email.
    • Inside this new folder, create a file named cf7-duplicate-email.php.
    • Copy and paste the entire code block provided above into this cf7-duplicate-email.php file.
  2. Activate the Plugin:

    • Go to your WordPress Admin Dashboard.
    • Navigate to “Plugins” > “Installed Plugins”.
    • Find “CF7 Duplicate Email Field” in the list and click “Activate”.
  3. Modify Your Contact Form 7 Form:

    • Go to “Contact” > “Contact Forms” in your WordPress Admin.
    • Edit the form where you want to add the duplicate email field.
    • In the “Form” tab, add two email fields. It’s crucial that one is named your-email (or whatever you set as the primary email in the PHP code) and the other is your-email-confirm.