Tell us what you are trying to do?
I have 2 dropdown lists on the site and when page is loaded, all results from the database are shown.
I need the opposite functionality, on load only dropdown list should be shown and when the user selects the item in dropdown, data is displayed below.
What is the link to your site? hidden link
password: factory
1st example hidden link
Internationale Partner on the right side (below the map), very long list of partners is shown
2nd example hidden link
Applications below, all applications are show, but we want only dropdown on start without the list.
Hello. Thank you for contacting the Toolset support.
As I understand - with the dropdown select filter you mentioned with both the examples you want to display only options which those dropdowns which are available as a result - correct? If yes:
Can you please navigate to the section "Custom Search Settings" on the edit view page - try to select the option:
- Let me choose individual settings manually
-- further, select the option "Show only available options for each input"
Hello, the functionality of the dropdown is OK (Ajax on change).
The problem is that I dont't want to show all results when the page is loaded. There should be no result on page load after the dropdown, results shoul be shown only when the user selects an option from the dropdown.
Ok - I understood. By default, you do not want to display any results.
Can you please try to add the following code to your current theme's functions.php file
or
You can add it to the "Custom Code" section offered by the Toolset:
=>
However - you also need to change the "Custom Search Settings " to:
- Let me choose individual settings manually
- and further within the section "Which options to display in the form inputs", select "Always show all values for inputs".
Please check the following screenshot.
=> hidden link
But there is another problem. I have some CSS aplied to adjust font size and margins and this function broke the CSS that is applied in the View template using built in CSS editor.
I managed to apply broken css via styles.css, but is there a way to use built in Views css editor in this case?
Great - Glad to know that the solution I shared helps you to resolve your original issue.
May I kindly ask you to open a new ticket with your every new question you may have. This will help other users searching on the forum as well as help us to write correct problem resolution summery. Thank you for understanding.