Title: Watermarks not working
Last modified: August 20, 2016

---

# Watermarks not working

 *  Resolved [adam.hal](https://wordpress.org/support/users/adamhal/)
 * (@adamhal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/watermarks-not-working/)
 * Hi
 * I had problem with watermarks, they are properly defined on the form screen but
   after displaying the form they are black, not grey and don’t disappear after 
   clicking on the input field.
 * The cause was that input fields do not have both, “wpcf7-use-title-as-watermark
   watermark” class and “title” attribute. I traced it back to plugin code and found
   this code in modules/text.php line 57:
 *     ```
       if ( wpcf7_script_is() && preg_grep( '%^watermark$%', $options ) ) {
   
       		$class_att .= ' wpcf7-use-title-as-watermark';
       		$title_att .= sprintf( ' %s', $value );
       		$value = '';
   
       }
       ```
   
 * The problem was ‘that wpcf7_script_is()’ returned null despite script file was
   attached in the footer. wpcf7_script_is() is defined in includes/controller.php
   on line 253 and uses
 * `wp_script_is( 'contact-form-7' );`
 * to determine whether script was attached or not. While echoing above function
   from controller.php it returns 1. Echoing it from text.php returns 0.
 * For the time being I deleted wpcf7_script_is() from the ‘if’ statement but is
   there any other, more elegant solution to this?
 * Thanks!
 * [http://wordpress.org/extend/plugins/contact-form-7/](http://wordpress.org/extend/plugins/contact-form-7/)

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/watermarks-not-working/#post-3558960)
 * Restore Contact Form 7 and switch theme to the default one.
 *  Thread Starter [adam.hal](https://wordpress.org/support/users/adamhal/)
 * (@adamhal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/watermarks-not-working/#post-3558992)
 * It worked on the default theme.
    I removed all scripts from my theme apart from
   wpcf ones in the footer but it didn’t worked.
 * I use wp_register_script, wp_enqueue_script and add_action to include JS.
 * Is there anything else I can try to fix this?

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

The topic ‘Watermarks not working’ 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

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

 * 2 replies
 * 2 participants
 * Last reply from: [adam.hal](https://wordpress.org/support/users/adamhal/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/watermarks-not-working/#post-3558992)
 * Status: resolved