Fixing Contact Form 7 Email Validation and Syntax Errors

Contact Form 7 BannerIf you’re here you’re probably frustrated with not being able to find the proper validation and syntax error fixes for Contact Form 7 when the plugin gets updated. Do not fear! We are here to help.

Right before creating this post we had to go through a quite a few different pages and spend some time finding the correct way to reformat fields.The main problems were “From” field email issues, the inability to reply to users who have submitted through the form and fixing additional headers syntax errors. If you are having any of those issues keep reading and we’ll start with the “From”. All these issues are being resolved in the WordPress Dashboard inside of the Contact Form 7 menu item.

Problem: Contact Form 7 Mail From Field Has Syntax Errors

Most Common Question:

Why doesn’t <[email]> work in the From Field?

Answer:

Simply put, mail clients have a very difficult time determining what messages are spam and what are real with this format. Luckily it is not a terribly difficult fix.

Fixing The Syntax Error:

You must have a email address that includes the domain of the website where the form is. The proper setup is to have your name mail-tag in the “From” section followed by the email associated with your domain. Here are a few examples of how that could look depending on your form settings:

 

Correct Email

Keep in mind you’ll need to match the “[name]” email-tag to those same tags being collected on the form.

Problem: Replying To An Email From CF7 Won’t Work

Most Common Question:

Why can’t I reply to the person who submitted their details through the form?

Answer:

Fixing the “From” field syntax error above will not allow you to reply directly to emails received via the form. The email address you are trying to send to is most likely invalid such as <noreply@yourdomain.com>.

Fixing The Email Does Not Exist Error:

We’ll need to add the email mail-tag into the message using the “Additional Headers” section on the “Mail” tab. This will allow you to reply directly to emails sent via the form, and have them send to the person who filled it out. Here are a few examples of how that could look depending on your form settings:

  • Reply-To: [email]
  • Reply-To: [your-email]

Reply additional header

Keep in mind you will also need to match the “[email]” mail-tag to those same tags being collected on the form.

Problem: Contact Form 7 Additional Headers Field Has Syntax Error

Most Common Question:

My Reply-To: [email] is working on other forms why not this one?

Answer:

The forms “[email]” mail tag has been updated and will no longer allow the “[text* email]” tag as a valid way to add the email field to your form. You will need to check for this error on the “Form” tab in CF7 and then update to the new supported version.

Fixing The Email Does Not Exist Error:

Navigate to the “Form” tab in CF7 and search for your email field by hitting (command/control F) to open the search box for your browser and type ‘email’. You should be able to find “[text* email]” the field that needs adjustment in the form. You will need to update this to the following:

  • [email* email]
<label for="name">Email</label>
[email* email]

Keep in mind you may have additional information between the brackets, the first “email*” is the area we are looking to fix inside the brackets. Everything else should remain the same as you have it.

And It’s Fixed!

I hope this helps you fix your Contact Form 7 validation and syntax errors quickly with less work to do digging through comments, and posts that are close, but don’t have the same problem as you.

Thanks for reading!

story written by Sam Jeanes