Skip Navigation

[Resolved] How can I let user to input text to search instead of dropdown menu?

This support ticket is created 3 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
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 4 replies, has 2 voices.

Last updated by Jamal 3 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2056549

Tell us what you are trying to do?
Allow user to search post by typing in text in the search bar , instead of / or together with the dropdown menu.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
The search function of : hidden link

What is the link to your site?
hidden link

#2056819

Hello and thank you for contacting the Toolset support.

Could you please elaborate a little more on your question so I can better understand it? Can you provide an example? More details about the data to search for?

If you are looking to mix both, the dropdown filter and the text search filter, on the same search input, you will need to implement it using custom Javascript code. A library such as Tagify may help hidden link

#2059089

Thanks Jamal,

E.g.
1. we want user to input zip code, city name, instead of pick it from the dropdown menu.
2. then filter results the nearest results to that zip code or city.

Do you think it's possible?

#2059093

And for the drop down menu, can we allow multi select?

#2059461

1. we want user to input zip code, city name, instead of pick it from the dropdown menu.
That's not available out for the box. But you can implement it with some custom Javascript code. You can use the Select2 library, or a similar library, for that. hidden link

2. then filter results the nearest results to that zip code or city.
What do you mean by the nearest? Are you talking about Toolset Maps distance search?
The dropdowns seem to me as if they are filters for custom fields. In that case, we can't talk about "nearest", it has to be the exact match.

And for the drop down menu, can we allow multi select?
That's possible for taxonomy filters and some field types(Select, Checkboxes).
Based on what editor you are using for the view(blocks, or legacy) the implementation is different.

Let me know more details about this view and I'll give accurate advises:
- What fields or taxonomies are used?
- What type of fields?
- Any additional information you think is relevant.