• Resolved Jane

    (@jstepak)


    I have the following in the “Additional Headers” field:

    Reply-To: [EmailAddress]

    where “EmailAddress” is one of the fields in the Contact Form.

    When I try to save the form I see the message “This field has syntax errors.”

    This error did not appear previously so I’m not sure if this is related to the latest update on the plugin.

    Maybe you have a idea of what’s causing the error?

    https://wordpress.org/plugins/contact-form-7/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Luisa Ravelli

    (@darkavenger)

    Hi!

    I think the correct syntax should be:
    Reply-To: <[EmailAddress]>

    Thread Starter Jane

    (@jstepak)

    Hi Darkavenger – Thanks for your suggestion. I tried it with the < > and I still get the syntax error. It’s very weird. On one site I have a similar field “Reply-To: [Email]” and it works just fine. I have also verified that “EmailAddress” is a valid field name.

    Luisa Ravelli

    (@darkavenger)

    Can you provide a screenshot for both form and mail tabs?
    Maybe it can be something that seems irrelevant.

    Thread Starter Jane

    (@jstepak)

    Thanks for offering to help me troubleshoot this. I’m embarrassed to say that I don’t see how to attach a screenshot to my reply.

    Or maybe I need to upload the screenshot to my site and provide you with the link?

    Thanks in advance for your help with this.

    Thread Starter Jane

    (@jstepak)

    Luisa Ravelli

    (@darkavenger)

    What is the sender field to? You already have the from field.
    Maybe this is the wrong line, can you try to remove it?

    Thread Starter Jane

    (@jstepak)

    Good question re: Sender field. I added that as it was part of a solution that someone else posted. I have removed it now and the “Additional Headers” field just has:

    Reply-To: <[EmailAddress]>

    See updated snapshot at:
    http://www.thecollaborative-staging.com/screenshots/pace-mail-screenshot-002.jpg

    Maybe you have another idea?

    Thread Starter Jane

    (@jstepak)

    I think I figured it out. I had defined the “EmailAddress” field to be of type “text”, thinking that I didn’t want to be so strict with this field. When I update the type to “email”, i.e. “[email* EmailAddress]” in the form definition then the syntax error for the “Additional Headers” field “Reply-To: <[EmailAddress]>” goes away.

    greencode

    (@greencode)

    Thanks @jane – I was having the same issue and have now changed from text to email and everything validates correctly.

    Snoweh

    (@snoweh)

    I was getting the same error in Additional Headers with the email field set to email.

    It seems the new update has introduced a bug where the email field needs to be required for the syntax to parse correctly.

    Luisa Ravelli

    (@darkavenger)

    @jane: happy you solve your problem!

    @snoweh: I think this is not a bug but a further control, in fact if someone try to get in touch with you without a correct email address you cannot reply to him.

    Snoweh

    (@snoweh)

    @darkavenger unless there’s a telephone number provided, or a postal address.

    What if the website visitor is using the contact form because they don’t have an email address & is happy to be contacted by telephone?

    There are plenty of use cases where having an email field as required is not appropriate or wanted.

    Thread Starter Jane

    (@jstepak)

    Moving this to resolved, as my original issue has a solution.

    Satorino

    (@satorino)

    Even after applying the solutions as per above “Syntax error” is still displaying if “Multiform” plugin is used. In my case I have 2 step form and in last step Mail settings “Reply to”, I am using Reply-To: [your-email], where [your-email] tag is from step 1, and of course it is defined as email field and not as text. Everything works fine, when form is received in email the reply-to contains correct entry as per [your-email]. The only annoyance is this “Syntax error” in red below the Contact form name. Any suggestions?

    As Jane said, it was because I used text field for email, changed it to email and error disappeared.

    If the plugin is smart enough to detect that text field used for an email entry, it should display smart error message with specific instructions.

    Thank you Jane πŸ™‚

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Syntax error in "Additional Headers" field with Reply-to’ is closed to new replies.