Hello,
I am trying to add search option in the select option.
Like when you click on the country drop down, then you will see the search option and after that the list of countries.
I think i can able to explain my issue.
Can any one please help me?
Thanks,
Sukumar
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Well - I would like to know here, you are displaying taxonomy as dropdown or custom field as dropdown select?
Additionally, you want to have implement chosen with your country select correct?
For example - something like this , correct? => hidden link
Hello,
I am using taxonomy as dropdown.
Regards,
Sukumar
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Ok - There is no native feature available but still you can try the following trick if that may help you:
Please try to add following code to your current theme's functions.php file and save it:
function enqueue_chosen_jquery() {
wp_register_style( 'custom_chosencss', '<em><u>hidden link</u></em>', false, '1.1.0', 'all' );
wp_register_script( 'custom_chosenjs', '<em><u>hidden link</u></em>', array( 'jquery' ), '1.1.0', true );
wp_enqueue_style( 'custom_chosencss' );
wp_enqueue_script( 'custom_chosenjs' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_chosen_jquery' );
Then - Edit your Form and add following code to JS editor:
jQuery(document).ready(function($){
$(".wpt-form-select").chosen({
no_results_text: "No Results Found!",
max_selected_options: 5
});
});
Hello,
Your code worked perfectly. further I need a small favor from you.
The drop down select is not responsive now. How can i fix this issue.
Regards,
Sukumar
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Sorry but that is beyond the scope of our support policy. As I update you before there is no such native feature exists but still I show you a way how you can achieve this.
You may check following link that may help you:
https://stackoverflow.com/questions/16960690/chosen-harvesthq-resize-width-dynamically