Skip Navigation

[Resolved] set placeholder for price filter

This support ticket is created 4 years, 5 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: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 4 years, 5 months ago.

Assisted by: Jamal.

Author
Posts
#1716385

Thanks for the improved code. Yes, I need set both placeholders with"Min" and "Max" respectively. I need to set the price textbox so that it can show around 3 digits only.

#1716389

Can you elaborate more on this, I am not sure to understand?
I need to set the price textbox so that it can show around 3 digits only.

For setting the placeholder, add the following code to your template:

jQuery(function($){
  $('#wpv_control_textfield_wpv-wpcf-cf-on-sale-price_min').attr('placeholder', 'Min');
  $('#wpv_control_textfield_wpv-wpcf-cf-on-sale-price_max').attr('placeholder', 'Max');
});

Note that this solution will not be ideal if your website will support other languages, and where you would need to customize(Min and Max strings).