Hello,
Eddy, here is how you can target a specific select list only.
jQuery('[name="ff_nm_selectlistname[]"] option').prop('hidden', false);
jQuery('[name="ff_nm_selectlistname[]"] option').not(jQuery('[name="ff_nm_selectlistname[]"] option:contains('+element.value+')')).prop('hidden', true);
NOTE: You have to replace selectlistname with the name of the select list element that you want to apply the search to.
Furthermore, here is the improved version of the code that will make the search case INSENSITIVE:
function ff_search_action(element, action)
{
jQuery('[name="ff_nm_selectlistname[]"] option').prop('hidden', false);
jQuery('[name="ff_nm_selectlistname[]"] option').not(jQuery('[name="ff_nm_selectlistname[]"] option:icontains('+element.value+')')).prop('hidden', true);
} // ff_search_action
jQuery.expr[':'].icontains = function(a, i, m) {
return jQuery(a).text().toUpperCase()
.indexOf(m[3].toUpperCase()) >= 0;
};
Basically, a new selecteor is defined which finds strings that contain another string regardless of uppercase/lowercase.
@Karlheinz68 as I wrote on the ticket, there is a way to make the select list always "open". You can go to Properties of the select list element and check there the "Multiple" checkbox.
NOTE that this will allow the user to choose more options in that select list.
Let me know whether this helped.
Regards,
Mihaela