Navigation überspringen

[Gelöst] Search form with Blocks: How to create several drop-down lists…

This support ticket is created vor 4 Jahren, 9 Monaten. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von martinP-14 vor 4 Jahren, 9 Monaten.

Assistiert von: Shane.

Author
Artikel
#1559705

Hi,

I start to use Blocks and have created a search form. It contains not only a text search but also (two) drop-down lists, populated by present values. Let's say "cities" and "countries"

In each list, there is a value already present when I load the page. If I hit "search" it seems that a combined search is performed.

But as "cities" shows a (first value)) city that does not belong to the show (first value) country, this makes no sense as now results are shown.

Maybe the drop-down lists should not show any initial value after loading the page. Or there should be an empty line in the drop-done list. Also after having selected a value I also need to de-select the drop-down list e.g. "cities" if I want to search for all Post of a certain "country".

Any idea?

Another question: if I use "control boxes" instead I can check or uncheck boxes so that things should wolr. But if there are many values present, the boxes are unhandy. At least the boxes should get shown in columns. ANy idea how to achieve this?

Kind regards, Martin

#1560343

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Sidebar.PNG

Hi Martin,

Thank you for getting in touch.

What you can do is to set a default value as you say for the dropdown options. If you click on your field to edit it in the block editor you should get the field settings in the Blocks Tab.

From there you should able to set the Label for the default option. This will be the first option on the dropdown.

Please let me know if this helps.
Thanks,
Shane

#1560421

Dear Shane,

thanks for your quick reply. Found...

If I put "bitte wählen" into this field for default, only "bitte" is displayed in the front-end. An error?

Kind regards,
Martin

#1560507

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

search field.PNG

Hi Martin,

That's odd it should display both text. Could you try using the English text --please search-- ?

I also tested out your exact text on my end and it works fine . See Screenshot

If the English text doesn't work could you allow me to have admin access to the site so that I can check this out for you as it shoiuld work.

Thanks,
Shane

#1560763

Thanks. When I tested first, the second (German) word was missing. Now it is visible. Hope that it works now for ever... 😉