WordPress Contact Form 7 missing form name

I’m using WordPress 4.2.2 and Contact Form 7 version 4.2.1. But when my contact form shortcode outputs the html code the name=”” attribute is blank and W3C html validator is giving me errors because of this. How can I fix this.

Related posts

1 comment

  1. It’s called “Contact form 7″, but I guess that is beside the point.

    You can set the form name attribute using the html_name attribute of the shorttag like this:

    [contact-form-7 id="7" title="My awesome contact form" html_name="my_awesome_contact_form"]
    

    It actually seems a bit strange that this is empty by default since that is considered invalid markup – so you may want to contact the developer(s) and let him / them know, so it can be fixed – I can’t even find any documentation referencing the html_name attribute – I only found it by looking directly in the source…

Comments are closed.