-
-
Save AllenWhittaker/8cb53b651d96c3435d9196dd8d1e8c73 to your computer and use it in GitHub Desktop.
Drop Down Search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action("gform_pre_render", "set_chosen_options"); | |
function set_chosen_options($form){ | |
?> | |
<script type="text/javascript"> | |
gform.addFilter('gform_chosen_options', 'set_chosen_options_js'); | |
function set_chosen_options_js(options, element){ | |
options.search_contains = true; | |
return options; | |
} | |
</script> | |
<?php | |
//return the form object from the php hook | |
return $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment