How to Resolve Configuration Errors

Contact Form 7 4.4 has introduced Configuration Validator, which validates contact form configurations to detect errors leading to mail delivery failure or other troubles. This article explains the expected input for each setting field, common mistakes, and how you can resolve those errors.

See also: FAQ about Configuration Validator

Form

Multiple form controls are placed inside a single label element. This message is shown because you have at least a label element in your form that invalidly contains two or more form controls. This is often caused by wrapping checkboxes or radio buttons with <label></label>, like the example below:

<label>[checkbox your-country "China" "India" "San Marino"]</label>

For labeling checkboxes and radio buttons, Contact Form 7 provides use_label_element option. Use this instead of label elements.

See also: Contact Form 7 4.5

Mail To Field

The To field specifies the email address of the recipient who receives the mail.

john@example.com

You can use mail-tags in this field. If you use mail-tags, ensure that the mail-tags are replaced with email addresses. Otherwise, it causes a syntax error.

This means every possible value through the form field corresponding to the mail-tag must be an email address or an array of email addresses. The following are bad examples of form-tags that cause the error:

[email your-email]

[select your-recipient "CEO|ceo@example.com"
                    "Sales|sales@example.com"
                    "Support|support@example.com"]

These are not required fields and possibly have empty values. Use email* and select* instead of email and select, respectively.

[text* your-email]

This is a required field, but it’s not an email field. Use email* instead of text*.

You can also set multiple addresses here. In such cases, use a comma to separate addresses.

Mail From Field

The From field specifies the email address of the sender.

john@example.com

You can also use another format consisting of a name and an email address surrounded by “<" and ">“.

John Smith <john@example.com>

You can use mail-tags in this field. If you use mail-tags, ensure that the field will be in the correct format after the mail-tags are replaced with user inputs. Otherwise, it causes a syntax error.

The email address used in this field should be an address belonging to the same domain as the site. Otherwise, it can increase the likelihood of being treated as spam.

Mail Subject Field

The Subject field specifies the subject of the message. It’s basically a free format, but it can’t contain markups like HTML tags.

The subject is not allowed to be blank. If you use mail-tags here, ensure that it’s not blank even after the mail-tags are replaced with user inputs.

Mail Additional Headers Field

You can set additional mail headers in the Additional Headers field. Content of this field (if it’s specified) must follow the syntax specified in the standard specification (RFC 5322). Otherwise, it will cause a syntax error.

Additional mail headers commonly used are: Cc, Bcc, and Reply-To.

Cc: john@example.com
Reply-To: john@example.com

Mail Message Body Field

The Message Body field is the message body of the mail. It is free format, but if it’s blank, the mail host may refuse to deliver the mail. If you use mail-tags here, ensure that it’s not blank even after the mail-tags are replaced with user inputs.

Messages

In the Messages tab in the contact form editor screen, you can edit messages that Contact Form 7 displays in different situations. You can only use plain text in the messages; do not use HTML tags and entities.

See also: HTML is Not Allowed in Messages

The active support forum volunteer, buzztone, explained in his blog post why this configuration validator was important, and how to resolve errors in further detail. I recommend you read it if you are still uncertain after reading this article.

Contact Form 7 Configuration Validator

Just another contact form plugin for WordPress. Simple but flexible.