WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Form validation when using default values (3 posts)

  1. publicradio
    Member
    Posted 3 years ago #

    Hello,

    I enjoy contact form 7 quite a bit but I also use default values quite a bit. When I have limited space for a contact form, I usually add 'enter your name' and 'enter your email' as default values. When a user doesn't fill out their name or email, the validation will still catch 'enter email' as an invalid email address, but it treats the default 'enter name' as a filled-out field. Is there any way to get around this?

    Thanks.

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    Use 'watermark' option for that purpose like this:

    [email* email-123 watermark "enter your email"]
    [text* text-123 watermark "enter your name"]

    http://contactform7.com/blog/2009/11/18/text-fields/

  3. publicradio
    Member
    Posted 3 years ago #

    Perfect. Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic