Skip Navigation

[Resolved] Placeholder [wpv-filter-search-box]

This support ticket is created 7 years, 7 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Tagged: 

This topic contains 8 replies, has 3 voices.

Last updated by davidm-13 7 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#441284

Good morning!

I am using relevanssi in combination with the [wpv-filter-search-box].
But I would like to have a placeholder in the search box.
What it the best option to achieve this? I have tried to create a new shortcode but I didn't work properly.

Thanks

#441581

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The easiest way is to add javascript/jQuery to your CRED forms JS box to add placeholder for your search input:

For example:

jQuery("#serMemtb").attr("placeholder", "your plalce holder content").blur();

More info:
=> http://stackoverflow.com/questions/9232810/change-placeholder-text-using-jquery
=> http://stackoverflow.com/questions/3919369/changing-the-placeholder-attribute-of-html5-input-elements-dynamically-using-j

#443355
Schermafbeelding 2016-10-05 om 12.23.08.png

Hello Minesh,
It's not for credform but for a view.

#443357

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sorry for the typo. you can use same code and add it to your View's JS box. Please remember to change the selectors.

#443703

Hello Minesh,

I have add the code to the JS editor of the view.
But what do you mean with change the selectors?
I am still learning....

#443705

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

When I say, selector, I mean the class or ID used to target the element.

However - If you do not know how to do it, I can help you in order to fix your issue. It will take hardly five minutes for me.

1)
You need to share the problem URL where you are displaying your view?

2)
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#443723

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now.

I've changed the jQuery code as follows:

jQuery(document).ready(function(){
  jQuery("input[name='wpv_post_search']").attr("placeholder", "Search here").blur();
});

So can just replace placeholder text as you want. For now, I have set as "Search here".

I hope this solution will help you to resolve your issue. Have a nice day!! 🙂

#443727

Great Minesh, thank you!!

#456596

Hi Minesh
I have a View for a custom search. in the Filter Editor I have the following

[wpv-filter-search-box id="srch-inpt-box"]

and in the javascript section I have:

jQuery(document).ready(function(){
jQuery("#srch-inpt-box").attr("placeholder", "enter search").blur();
});

but the search box remains empty - no placeholder - what am I doing wrong?

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