WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Watermark not working properly (5 posts)

  1. nerdfalcon
    Member
    Posted 2 years ago #

    I have set up a contact form and it does not add the class correctly to "text" input fields. It works well on "textarea".
    How can i assure that it works with "text" input as well and does not show in black but the defined grey textcolor?

    Firebug tells me, the class is disabled

    < input type="text" title="z.B. Hans Schmidt" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required wpcf7-use-title-as-watermark watermark" value="" name="your-name" >

    Firebug says
    div.wpcf7 .watermark
    color: #bbbbbb;
    is not active, the color is struck.
    How can i change this behaviour for "text" input?

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

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    How have you set up the your-name field in the form?

  3. charlotte83
    Member
    Posted 2 years ago #

    Hi I have the same issue with the watermark, the text I have in the form is

    [text* your-name watermark "Votre nom"]

    You can see the result on this website: http://charlottevial.com/contact-me/

    (This is only the first field).

    Thanks for your help !

  4. nerdfalcon
    Member
    Posted 2 years ago #

    Hi Takayuki, this is my form:

    <label for="your-name">Your name <span style="color: red; font-size: 9px; vertical-align: sup;">*</span></label><br/>[text* your-name watermark "e.g. John Doe"]<br/>
    <label for="your-email">You e-mail address <span style="color: red; font-size: 9px; vertical-align: sup;">*</span></label><br/>[email* your-email watermark "your.name@mailprovider.com"]<br/>
    <label for="your-subject">Subject<span style="color: red; font-size: 9px; vertical-align: sup;">*</span></label><br/>[text* your-subject watermark "Your subject here"]<br/>
    <label for="your-phone">Phone number</label><br/>[text your-phone watermark "Your number (e.g. for feedback calls)"]<br/>
    <label for="your-message">Message <span style="color: red; font-size: 9px; vertical-align: sup;">*</span></label> [textarea* your-message watermark "Enter your message here"]<br/>

    [ Please do not bump, it's not permitted here. ]

  5. lsirivong
    Member
    Posted 1 year ago #

    Use at your own risk, but I've gone in and modified my files to use the HTML5 placeholder attribute instead of setting the title and using javascript to handle the placeholder:

    If you're interested:

    https://gist.github.com/4339151

    The changed lines can be found by searching for references to $placeholder_att.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic