Can't figure out why my GF woo product add-ons drop down options all have the "search" input field as the first option. It should only be the drop down options showing. Any suggestions?
Screenshot: http://oi45.tinypic.com/6fzdeb.jpg
Thanks!
Can't figure out why my GF woo product add-ons drop down options all have the "search" input field as the first option. It should only be the drop down options showing. Any suggestions?
Screenshot: http://oi45.tinypic.com/6fzdeb.jpg
Thanks!
That is normal when you activate the enhanced user interface for the drop down, I am not sure if the chosen plugin gravity forms are using for the enhanced user interface provides a way of disabling the search field. That said you may try using css to hide it if you really don't want it by adding something like this to your themes style.css
.chzn-search { display: none; }
Edit:
According to the following topic over on the chosen scripts issue tracker it looks like they added the ability to disable the search field a few months back by passing the parameter "disable_search: true", but I don't think the chosen scripts included with gravity forms have been updated in a while so until they are updated in a future version of gravity forms I think your only option is to use the css above.
Hey Richard, thanks a ton. I'll give that a shot.
Can I put that directly into the form field CSS properties or should I do it in my custom.css using editor?
just added the following code to the custom css input field in my woothemes (mystile) dashboard and it did the trick.
}
.chzn-search { display: none; }
}
good to hear you got it sorted.
Just to update this topic you can also use the filter gform_chosen_options to disable the enhanced user interface search feature when less than a set number of options are present or altogether.
You would add the following to your functions.php file
add_action('gform_pre_render','set_chosen_options');
function set_chosen_options($form){
?>
<script>
gform.addFilter('gform_chosen_options','set_chosen_options_js');
function set_chosen_options_js(options,element){
// disable search if select has less than 5 options
options.disable_search_threshold = 5 ;
// to disable search altogether use options.disable_search = true;
return options;
}
</script>
<?php
return $form;
}
Find out more about gform_chosen_options and an example of how to limit the number of items which may be selected in a multi-select field on the following page of the documentation
http://www.gravityhelp.com/documentation/page/Gform_chosen_options
Regards,
Richard
--
Just another member of the community helping out where I can
Thanks as always richard. :)