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.
1 comment
Comments are closed.
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: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…