Title: Remove select2 &amp; use default
Last modified: April 19, 2023

---

# Remove select2 & use default

 *  Resolved [Manish S](https://wordpress.org/support/users/shahmanish877/)
 * (@shahmanish877)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/)
 * How can we remove select2 for dropdown & use default select? I tried dequeue 
   select2 css & js but that didn’t work.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16669485)
 * Hi [@shahmanish877](https://wordpress.org/support/users/shahmanish877/)
 * I hope you’re well today!
 * Select2 should only be used if it’s actually needed – for multi-choice select/
   fields.
 * Each “select” type field can be set to “single” or “multiple” choice mode and
   if you set them all across the form to “single” choice – there should be no select2
   loaded.
 * If you need to use “multi-choice” selections then select2 is necessary and removing
   it would break those fields.
 * Kind regards,
    Adam
 *  Thread Starter [Manish S](https://wordpress.org/support/users/shahmanish877/)
 * (@shahmanish877)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16671023)
 * Yes, I did select type to **single **& disabled **Search **option in settings.
   But that didn’t give default browser select input type.
 * Here’s what I want (default browser select) – [https://nimb.ws/adMORB](https://nimb.ws/adMORB)
   
   and here’s what I get (forminator select) – [https://nimb.ws/6nKS7f](https://nimb.ws/6nKS7f)
 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16672901)
 * Hi [@shahmanish877](https://wordpress.org/support/users/shahmanish877/)
 * This wouldn’t be a matter of “default browser select” and select2 but rather 
   some CSS either breaking or “getting in a way” – as that second screenshot (the“
   what I got” one) shows that the select doesn’t even look correct for Forminator
   built-in styles.
 * So something is affecting those styles.
 * Would you be able to share a link to the page with the form in question so we
   cold take a look and see if we can find a remedy for that?
 * Kind regards,
    Adam
 *  Thread Starter [Manish S](https://wordpress.org/support/users/shahmanish877/)
 * (@shahmanish877)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16672913)
 * I don’t think that’s true. In screenshot, it’s showing misaligned due to screenshot
   software which hid the scrollbar & made it look misalign.
   This is the website
   link – [https://www.suffolktouristguide.com/hotels/chestnut-cottage-dedham](https://www.suffolktouristguide.com/hotels/chestnut-cottage-dedham)
 * You can check it yourself. When you do the inspect then you can see it’s using
   select2 components but not the <select> tag. I have reduced line-height to make
   it small & to look like default select but it’s still select2.
    -  This reply was modified 3 years, 1 month ago by [Manish S](https://wordpress.org/support/users/shahmanish877/).
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16678583)
 * Hi [@shahmanish877](https://wordpress.org/support/users/shahmanish877/)
 * I hope you are doing well.
 * You can use this code:
 *     ```
       <?php
   
       function forminator_remove_select_2_functon() {
       wp_dequeue_script( 'forminator-select2' );
       wp_deregister_script( 'forminator-select2' );
       }
       add_action( 'wp_print_scripts', 'forminator_remove_select_2_functon', 9999 );
       ```
   
 * But removing Select2 will also require adding your own style for that field [https://monosnap.com/file/oJe12h4bUDUiNYF4jKDmuYUApTWqTb](https://monosnap.com/file/oJe12h4bUDUiNYF4jKDmuYUApTWqTb)
 * This should help:
 *     ```
       .forminator-select2{
           border: 1px solid #D5D5D5 !important;
           border-radius: 5px !important;
           background-color: #F5F5F5 !important;
           color: #909090 !important;
           font-size: 16px !important;
           letter-spacing: 0 !important;
           line-height: 19px !important;
           height: 35px !important;
           width: 100%;
           padding: 0 10px;
       }
       ```
   
 * [https://monosnap.com/file/PP0zUwzop7G3B8Neewvs6pdCoDgPBt](https://monosnap.com/file/PP0zUwzop7G3B8Neewvs6pdCoDgPBt)
 * Best Regards
    Patrick Freitas
 *  Thread Starter [Manish S](https://wordpress.org/support/users/shahmanish877/)
 * (@shahmanish877)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16680564)
 * I had tried **wp_dequeue_script** but that didn’t unregister select2, not sure
   why it’s not working. To confirm, I even checked it on new setup on my localhost.
 * You can also check in this temporary site – 
   URL – [https://snorepush.s4-tastewp.com/sample-page/](https://snorepush.s4-tastewp.com/sample-page/)
   Login URL – [https://snorepush.s4-tastewp.com/wp-admin](https://snorepush.s4-tastewp.com/wp-admin)
   username – manishshahpassword – 3HHu9-g53a0
 * Let me know if I did something wrong here.
    -  This reply was modified 3 years, 1 month ago by [Manish S](https://wordpress.org/support/users/shahmanish877/).
 *  Plugin Support [Saurabh – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support7/)
 * (@wpmudev-support7)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16687469)
 * Hi [@shahmanish877](https://wordpress.org/support/users/shahmanish877/)
 * Hope you are doing fine.
 * It may be necessary to change the code a bit, could you try the code below instead?
 *     ```wp-block-code
       // Deregister select2 js file.
       add_filter( 'the_content', function( $content ) {
           wp_dequeue_script( 'forminator-select2' );
       	return $content;
       }, 11 );
   
       // Remove forminator-select2 html-class.
       add_filter( 'forminator_field_single_markup', function( $html, $id, $required, $options ) {
           $html = str_replace( 'forminator-select2', '', $html );
       	return $html;
       }, 10, 4 );
       ```
   
 * You can use it as a mu-plugin. Find more information in the link below:
   [https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins](https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins)
 * Please make sure to test it in a staging site first.
 * Kind regards
 * Luis
    -  This reply was modified 3 years, 1 month ago by [Saurabh - WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support7/).
 *  Thread Starter [Manish S](https://wordpress.org/support/users/shahmanish877/)
 * (@shahmanish877)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16697393)
 * Thank you. That finally worked. Now, I need to add the styles.
 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16700559)
 * Hi [@shahmanish877](https://wordpress.org/support/users/shahmanish877/)
 * **Please do NEVER post any access credentials on this forum. It’s public and 
   it’s not allowed as it may pose a serious security risk._ Unfortunately, we are
   not able to edit your post to remove those so please make sure that the credentials
   that you shared are no longer valid/existing. This is critical._ **
 * > Now, I need to add the styles.
 * My colleague suggested a CSS that should help in this post
 * [https://wordpress.org/support/topic/remove-select2-use-default/#post-16678583](https://wordpress.org/support/topic/remove-select2-use-default/#post-16678583)
 * Please copy it and then edit your form and in its “Appearance” settings at the
   bottom enable “Enable custom CSS” option and put that CSS there, then update 
   the form and clear all cache.
 * If it still doesn’t work, try adding that CSS via theme’s “Custom CSS” option(
   if there is such option) or using a plugin such as Simple CSS, instead of form’s
   custom CSS.
 * Kind regards,
    Adam

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Remove select2 & use default’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

## Tags

 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [select](https://wordpress.org/support/topic-tag/select/)
 * [select2](https://wordpress.org/support/topic-tag/select2/)

 * 13 replies
 * 4 participants
 * Last reply from: [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/remove-select2-use-default/#post-16700559)
 * Status: resolved