I'm trying to get a live searh in dropdown like as the cred dropdown.
I followed the instructions of this post without results. -> https://toolset.com/forums/topic/live-search-dropdown-in-wpv-control-post-taxonomy/
Any help?
Thanks in advanced
What precisely do you mean with Live Search?
A Select2?
That would be what Toolset Forms uses in "Parent Post Selectors", for example.
If you want to implement that to Toolset Search Inputs you need custom code that we can not provide here.
You'd need to request it from https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/ as a feature to be considered in future. If you need help with custom programming, we can suggest consulting any https://toolset.com/contractors/.
Unfortunately, we cannot help with implementing Select2 on the Views Search Inputs, it would require a new Feature.
Hi Beda.
I'd like to get in dropdown custom search the same dropdown that I have in cred form.
I attach an screenshot -> This is a toolset cred form with data-live-search. I followed the instructions of Minesh post but It doesn't work.
Can you help me?
Thanks for adding the screenshot. This is a "Select2" Select Input.
Select2 is an external library that developers can use to enhance the Select Inputs.
hidden link
Toolset does not implement this in the Custom Searches on the Front end, to have it you would need to suggest it as a feature request at https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/.
If you would need an immediate solution you would need to integrate Select2 into the Views Front End Filters, which we cannot support in this forum.
If you'd need help with the custom coding, we recommend consulting with certified contractors from https://toolset.com/contractors/
My issue is resolved now. Thank you!
Hi again Beda. It's solved. Thanks to looking at toolset.wiki and doing some tests
function enqueue_select2_jquery() {
wp_register_style( 'select2css', '/wp-content/themes/my-child-theme/js/select2.min.css', false, '1.0', 'all' );
wp_register_script( 'select2', '/wp-content/themes/my-child-theme/js/select2.min.js', array( 'jquery' ), '1.0', true );
wp_enqueue_style( 'select2css' );
wp_enqueue_script( 'select2' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_select2_jquery' );
In Dropdown filter :
Class: Select
Style: Select2
in Search and Pagination JS
jQuery( document ).ready(function() {
jQuery('.select').select2();
});
Hi, David!
It almost worked. Even with values in the combobox, "no results found" is reported. When running Select2, it looks like it is reset.
What could it be?
Thank you!