• I am having trouble getting the watermark to work properly, or perhaps I’m not fully understanding the ‘watermark’ feature. I’m thinking that if the textfield is using the watermark feature as soon as the user clicks the field the default text value disappears so they don’t have to delete the default value before typing in their email, or name.

    If this is not what the ‘watermark’ feature is can someone explain it to me?

    Also, if anyone knows how to configure the text fields to have a default value that disappears when a user clicks into the box, please let me know. I have been looking around and don’t see how to do so.

    Thank you for your help and look forward to hearing from you.

    Sincerely,
    Chris

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Watermark shows description of field. It’s different from default value.

    Also, if anyone knows how to configure the text fields to have a default value that disappears when a user clicks into the box, please let me know. I have been looking around and don’t see how to do so.

    It’s impossible. Because if it disappears when user clicks, it can’t work as a default value.

    Thread Starter centinel3

    (@centinel3)

    You can have a default value disappear when a user clicks in the box. Look at any common search field that displays ‘search’ in teh text area. When you click into it you don’t ahve to remove the text, it just disappears.

    The code below will do exactly what I’m looking to do with Contact Form 7, thoguh am not sure where to implement this in the template itself. Any help would be appreciated.

    <input type="text" name="ea" id="ea" size="20" value="Enter E-mail Address" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" />

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    “Default value” is a text which will be submitted to the server when you don’t change it. It does not disappear, because if it disappears it can’t be submitted.

    What you wish is “watermark”. Watermark is a text which disappears when the field has focus. “Default value” and “watermark” are different things.

    If you have set watermark option as the doc tells and it doesn’t work, maybe javascript is not working on your site or having errors.

    Thread Starter centinel3

    (@centinel3)

    I have tried various ways to get that ‘watermark’ to work and nothing seems to work properly. javascript is turned on.

    I’m having this same issue. The watermark feature is great, but it’s not working. I notice that in your text field “class” the form puts “wpcf7-use-title-as-watermark”. I can’t seem to find that in the code when editing the plugin. Even as a class though, I’ve never heard of a way of using javascript in the CSS style sheets <- disregard you’re connecting the watermark value in another way.

    Did anyone figure this out?

    Ok. figured my problem out. You need to make sure you are calling the wp_footer in your footer.php file.

    <?php
    	/* Always have wp_footer() just before the closing </body>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to reference JavaScript files.
    	 */
    
    	wp_footer();
    ?>

    Every plugin need some javascript or stylesheet. And they are called by tag , wp_head() whitch is stated in header section. Make sure your header section.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Contact Form 7] text field and text area watermark not working’ is closed to new replies.