Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › "multiselect" without search › Reply To: "multiselect" without search
June 29, 2021 at 9:44 am
#33789
Keymaster
Hi,
Well, it might be possible via a a small custom javascript code.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action("wp_footer", "wp_footer_add_asp_script", 9999);
function wp_footer_add_asp_script() {
?>
<script>
document.querySelectorAll('.asp_select2-search__field').forEach(function(el) {
el.disabled = true;
});
</script>
<?php
}
This will disable the search input on the multiselect alltogether, if all goes well.