Skip Navigation

[Resolved] Is it Possible to Add Placeholder Text/Default Label to [wpv-filter-search-box]

This support ticket is created 8 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 20 replies, has 7 voices.

Last updated by Joe H. 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#375360

Hi Woody, Sorry for the mistake please go to this location in the plugin folder:

/wp-views/embedded/inc/wpv-shortcodes.php and locate line 3783 and place: placeholder="whatever text you want" as per the code snippet below. Sorry again as was looking through so many files before finding the one I needed 🙂

    return '<input type="text" placeholder="whatever text you want" name="wpv_post_search" ' . $value . ' class="js-wpv-filter-trigger-delayed'.  $class . '"'. $style .' />';
#375424

Thanks mate... really appreciate it.

Have you tried using "different" field types for this? i.e. - input type = "textfield", "select", etc?

I will likely give it a go as the placeholder styling for forms is something many clients are requesting.

Thanks again.

Woody

#375701

Styling the placeholder is the easy bit, if you don't already know here are the standard css style names for the placeholder:

::-webkit-input-placeholder {
   color: red;
}

:-moz-placeholder { /* Firefox 18- */
   color: red;  
}

::-moz-placeholder {  /* Firefox 19+ */
   color: red;  
}

:-ms-input-placeholder {  
   color: red;  
}

and by placing the input class or id before each of the styles will allow you to target that specific input.

🙂

#446949
placeholder.png

Sorry, but I cant find return

return '<input type="text" placeholder="whatever text you want" name="wpv_post_search" ' . $value . ' class="js-wpv-filter-trigger-delayed'.  $class . '"'. $style .' />';

in
/wp-views/embedded/inc/wpv-shortcodes.php
line 3783 ,
and to put the custom place holder

#448010

Found it now is on 5834 row.
Thanks to all.

#542759

As of this date its now on row 7173.
Mostly just posting here so I can find it again 🙂 Well, and for others who may be looking...

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.