Title: Placeholder text validating required fields error!
Last modified: August 21, 2016

---

# Placeholder text validating required fields error!

 *  Resolved [zMeth](https://wordpress.org/support/users/zmeth/)
 * (@zmeth)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/placeholder-text-validating-required-fields-error/)
 * OK so I am using placeholder text for my input fields and marking them as required,
   the form can be submitted without any text being entered.
 * It is obviously counting the placeholder text as a value which it should not.
   I have tried using “watermark” instead but this makes no difference.
 * I found a solution on stackoverflow:
 * Replace ” var submit = form.find(‘input:submit’);
    if (! submit.length) return;“
 * with ” var submit = form.find(‘input:submit’);
    if (! submit.length || submit
   == this.find(‘[placeholder]’).wpcf7Placeholder()) return;”
 * This actually works, however throws an error saying “HTMLForm has no method find”
   which although the validation works fine, it breaks another element on the site.
 * Anyone have any ideas please?
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/placeholder-text-validating-required-fields-error/#post-4683788)
 * Try switching to the default theme.
 *  [Reena SB](https://wordpress.org/support/users/reena-sb/)
 * (@reena-sb)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/placeholder-text-validating-required-fields-error/#post-4684090)
 * I had the same issue and I replaced `if (! submit.length) return;` with `if (!
   submit.length || submit == this.find('[placeholder]').wpcf7Placeholder()) return;`
   but the response button is not working for me. Any idea how to fix this?
 *  [Reena SB](https://wordpress.org/support/users/reena-sb/)
 * (@reena-sb)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/placeholder-text-validating-required-fields-error/#post-4684093)
 * This is fixing the issue but I also found that the responsive button is not displaying
   the menu options on click.
 * Can anyone help me in fixing this issue?

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

The topic ‘Placeholder text validating required fields error!’ 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/)

 * 3 replies
 * 3 participants
 * Last reply from: [Reena SB](https://wordpress.org/support/users/reena-sb/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/placeholder-text-validating-required-fields-error/#post-4684093)
 * Status: resolved