Title: W3 Validator
Last modified: August 30, 2016

---

# W3 Validator

 *  [Bryan Suarez](https://wordpress.org/support/users/subscr/)
 * (@subscr)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/w3-validator-2/)
 * Hi Dev,
 * It seems the W3 Validator update there algorithm. Here’s what I get when validating
   my site “Bad value for attribute name on element form: Must not be empty” I hope
   it fix.
 * Thanks.
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [nio89](https://wordpress.org/support/users/nio89/)
 * (@nio89)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/w3-validator-2/#post-6281840)
 * Any news on a fix soon?
 * Thank you.
 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/w3-validator-2/#post-6281879)
 * The issue is ( could be, I am not the dev ) that whenever Contact Form 7 generates
   the form shortcode it doesn’t create a `name` attribute and it doesn’t seem to
   fallback to using the `title` attribute of the shortcode.
 * HTML5 doesn’t like empty `name` attributes, this is an issue on WPCF7 side IMO.
   One solution ( for the dev ) could be in the `wpcf7_contact_form_tag_func()` (/
   includes/contact-form.php Line 880 ) function to check if `html_name` attribute
   is empty, and if it is, generate the `title` attribute as the name.
 * **For Users** – A short-term solution until this is fixed _could_ be to add an
   attribute to your Contact Form 7 shortcode `html_name` and give it some kind 
   of string value. This will solve the validation issue. It’s something WPCF7 should
   handle but it works in the meantime.
 * E.G. `[contact-form-7 id="4" title="Contact Form" html_name="Contact Form 1"]`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘W3 Validator’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [Multipost](https://wordpress.org/support/topic-tag/multipost/)

 * 2 replies
 * 3 participants
 * Last reply from: [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/w3-validator-2/#post-6281879)
 * Status: not resolved