- This topic has 2 replies, 2 voices, and was last updated 7 years, 4 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Default value in dropdown with ACF + S&F
Tagged: acf, default value, S&F, V3
Is it possible to have a default value instead of having “All Items” in the Choice – Dropdown? My customer wants a pre-selected language in the dropdown, for example: English not All Items.
Im using ACF Pro. Shortcode method. Latest versions of all plugins.
With the current version of the plugin, this is not a feature, but I think it is something coming in V3.
It is possible to do with custom javascript, but it gets complicated as that same javascript could then end up overriding any user selection.
Great, if it becomes av feature in v3!
I think I have solved it with JS. I used only this line:
$(‘.sf-field-post-meta-doc_lang .sf-input-select’).prop(“selectedIndex”, 1);
It selects the 2nd item in the dropdown. When I press the submit button it gives me the correct results.
Using Ajax method for the results on the same page. It doesn´t display the correct results on page load, but that isnt necessary for me.