I am trying to:
Display in a parametric search a multiselect with the chosen ui
Link to a page where the issue can be seen: hidden link
I expected to see:
The chosen ui multiselect style from the beginning.
Instead, I got:
The select field changes to chosen when I click any filter, search button or reset button.
After i clicked one of the above it's working fine.
Hello. Thank you for contacting the Toolset support.
Well - could you please tell the filter you've added is for custom field or taxonomy field.
What if you try to add following attribute to your filter shortcode you are using: - to disable the select2.
use_select2="never"
Could you please check it that helps, if not, could you please share the code you are using within your view's filter to display that multiselect field.
At first I integrated chosen manually in my script.js but than i noticed that chosen is already integrated in toolset.
Where can I set the different options for chosen?
[wpv-control-post-taxonomy taxonomy="lehrinhalt" type="multi-select" format="%%NAME%% (%%COUNT%%)" url_param="wpv-lehrinhalt" class="chosen-select"][php]
At first I added this in the script.js, but it works without it too:
[php]
$(".chosen-select").chosen({
no_results_text: "Leider kein Treffer!",
max_selected_options: 5
Well - I tried to check with my local test install and I see that the multi-select remains the same.
Now, as I understand, you want to display taxonomy with chosen select when page loads as well as when user change the filter - If this is correct. I need access details so I can try to apply available view's js event hooks.
*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
Well - It looks like when page load we need to initialize the filter again with chosen. So I've added following code as you suggested to view's filter JS box and I can see when page is loaded it by default shows filter with chosen.
jQuery(document).ready(function($){
$(".chosen-select").chosen({
no_results_text: "Leider kein Treffer!",
max_selected_options: 5
});
});