Skip Navigation

[Resolved] How do I disable preselection in a dropdown in search?

This thread is resolved. Here is a description of the problem and solution.

Problem:
Item in taxonomy dropdown in search filter is pre-selected.

Solution:

Within [wpv-control] taxonomy dropdown shortcode, add the auto_fill_default attribute with an empty value.

Example:

[wpv-control taxonomy="books-author" url_param="wpv-books-author" type="select" default_label="Please select Author"  auto_fill_default=""  taxonomy_order="ASC" taxonomy_orderby="name" hide_empty="false"]

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control

This support ticket is created 7 years 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
- 8:00 – 13:00 8:00 – 13:00 8:00 – 13:00 8:00 – 13:00 8:00 – 13:00 -
- 14:00 – 17:00 14:00 – 17:00 14:00 – 17:00 14:00 – 17:00 14:00 – 17:00 -

Supporter timezone: Indian/Mauritius (GMT+04:00)

This topic contains 2 replies, has 2 voices.

Last updated by jonathanW-2 7 years ago.

Assisted by: Arvish Mungur.

Author
Posts
#512440

I have a search form here: hidden link

I do not want there to be a Speaker that is preselected in the dropdown.

How do I do this?

#512463

Hello jonathanW-2,

Thank you for contact Toolset Support.

I will be happy to help you with your issue.

[wpv-control] shortcode offers the attribute ‘‘default_label” which is used to set the default option for taxonomy dropdown.

For Example:

[wpv-control taxonomy="books-author" url_param="wpv-books-author" type="select" default_label="Please select Speaker"  taxonomy_order="ASC" taxonomy_orderby="name" hide_empty="false"]

You can also configure this option by editing the filter via the “Edit Filter” button:
hidden link

For further information you can consult the following link:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control

Please let me know if this fixes the issue for you.

Kind regards

#512668

Hello Arvish!

Thank you for the quick response. Turns out that what I was looking for is the

auto_fill_default=""

instead of the

default_label=""

.

But you definitely helped with that wiki link and suggestion on editing the filter!

Thanks so much!

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