Support » Plugin: Chosen for WordPress » is there a class to protect from chosen?

  • i like chosen and i’m using it on a website.
    however, i’ve built a custom form and i’d like it to stay the way i’ve built it. i worked hard to make it as compact as possible and chosen messes up my styles a bit.

    is there a way to tell chosen not to chosenify certain forms? or maybe a class for the fields i don’t want processed?

    thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you find a solution to this problem? If so, could you share your solution?

    I was just searching for a solution to this problem myself, and decided to just edit the file. This works, but obviously if youre going to update your plugin, you’ll need to make the change again.

    1) Deactivate the plugin
    2) Go into the editor to edit the plugin. Find the file, wp-chosen.js. itll contain the line below.

    jQuery(document).ready(function($) { $('select:not(#mo-fonts)').chosen();});
    3) Modify the line to include a special div for your select dropdowns that you dont want Chosen on. So for example, if you added a class of .normal-select, the line would like:
    jQuery(document).ready(function($) { $('select:not(#mo-fonts, .normal-select)').chosen();});

    Make sure you actually add this class to your select field, however you are creating your form. If its an automated form, your select form may already have a unique class or ID you can put in there.

    Hope that helps somebody!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is there a class to protect from chosen?’ is closed to new replies.