Skip Navigation

[Resolved] Label for the first default option

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)

This topic contains 11 replies, has 1 voice.

Last updated by Minesh 2 weeks, 1 day ago.

Assisted by: Minesh.

Author
Posts
#2828960

Dear Team,

well toolset is great, no question. I´m a beginner, no question too :)!

Now I´m Adding the search fields. And I saw in the video ( want to make a direktory site )
that I can change the label to the first default option to all, so that there is not an empty line.

But thats not what I want. I want that only the added Taxonomie is shown.

I Added the german states. I want that the first state which is listet should be shown and NOT all.

How can I delete that empty line there, so that directly the added parameters are shown ?

THX in adv.

Tony

#2829134

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Do you mean you want to only show the options that is available with your view's result?

Can you please share problem URL where you added your view and tell me with what taxonomy filter you want to set default option?

*** 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 have set the next reply to private which means only you and I have access to it.'

#2829164

Hi,

thanks for reply.

I meant that, as in my example, only the cities that can be searched for are displayed and NOT "ALL" or an empty field,
but directly the first city is displayed sorted alphabetically to select in the dropdown.

Thx in advance. 🙂

Tony

#2829231

Minesh
Supporter

Languages: English (English )

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

Can you plese share problem URL where you added your view with filters and send me admin access details.

*** 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 have set the next reply to private which means only you and I have access to it.

#2829386
search_delete_line.JPG

Good morning,

I cannont send an url because its under construction. So I mean to delete the first line of the seacht boxes as image attached.

How can I do this ? (the empty line and "ALLE" in the boxes )

Thx inadvance.

Best

toni

#2829392

Minesh
Supporter

Languages: English (English )

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

I would like to know - are you usting Toolset Blocks?

Can you please share details that those drop-down is taxonomy filter or custom field filter?

#2829465

Hi,

its Taxonomy filter and used in toolset blocks yes 🙂

regards

toni

#2829633

Minesh
Supporter

Languages: English (English )

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

With the taxonomy filters you add on your block view, when you select any of the taxonomy filter, on right panel you will see the option to set the default option for that taxonomy filter.

Please check the following screenshot:
- hidden link

#2829656

Hi Minesch,

thanks for help. But how can I enter the settings, so that if "please select" is in the field, that no result will be shown bevor something was chosen ?

When I let "please select" inside, results will be shown also....?

Thx in adv..

toni

#2830289

Christopher Amirian
Supporter

Languages: English (English )

Hi Toni,

Sorry for our late reply. I will continue this ticket.

For removing the empty line and "ALL":

- Edit the page and select the Taxonomy Filter block (the dropdown).
- In the right sidebar (Block settings → Filter options):
- Turn OFF “Include ‘Any/All’ option.”
- Turn OFF “Include an empty ‘Please select’ option.”
- This removes both the blank line and the “ALL” entry.

To show no results until a choice is made:

- Click the View block (outer block that contains the results + filters).
- In the sidebar → Custom Search (or Search & Pagination) settings:
- When the page loads: choose “Show only items that match the search” (so with nothing selected, zero results).

Toolset doesn’t auto-pick “the first term” out of the box. You have two options:

Manual default: In the Taxonomy Filter block, use Preselect terms and choose the city you want as default.

Auto-select via tiny JS (optional):
Replace your-tax-slug with your taxonomy slug:

document.addEventListener('DOMContentLoaded', function () {
  const sel = document.querySelector('select.wpv-control-post-taxonomy[name="wpv-taxonomy-your-tax-slug"]');
  if (sel && (!sel.value || sel.value === '')) {
    for (const opt of sel.options) { if (opt.value) { sel.value = opt.value; break; } }
    // If your View updates on change, trigger it:
    sel.dispatchEvent(new Event('change', { bubbles: true }));
  }
});

This picks the first real term if nothing is selected, and triggers the View to refresh if you’re using “update results instantly.”

You can add the JS code above to the JS portion of the view.

Thanks.

#2832545

Dear Christopher,

all fine. Thx for your big help reply.

My Problem is, that I cannot find the Filter options and where to turn something on or off.
- In the right sidebar (Block settings → Filter options):
- Turn OFF “Include ‘Any/All’ option.”
- Turn OFF “Include an empty ‘Please select’ option.”
- This removes both the blank line and the “ALL” entry.

Can you send me a screenshot to find it ?

I searched all in the sidebar long and many times....

Thx in advance and have a successful day.

toni

#2832682

Minesh
Supporter

Languages: English (English )

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

Even I do not see those options.

To hide the search result until the first option is selected - please try to follow the following steps given with the following Doc:
- https://toolset.com/course-lesson/creating-a-custom-search/#hide-the-search-results-until-the-first-search