The Chosen module no longer get applied to Webform select fields with the most recent updates to a Drupal Commerce 2.0 site that I am working on. I am using Chosen version 7.x-2.0-beta4+1-dev (part of Commerce Core) and Webform version 7.x-4.0-beta1. After further investigation, I noticed that the library for Chosen is not being loaded on pages with webform selects. I did some research and found the article below suggesting that, "...there is a bug in [the] Webform [Module] that removes all the #pre_render callbacks from select elements when used in Webforms..."


Looking through the Webform module's source code I found the following method which should render select components. Although it doesn't appear that anything is missing.

* Implements _webform_render_component().
function _webform_render_select($component, $value = NULL, $filter = TRUE)

I did come across another post that mentioned CKeditor causing issues, but after updating to 4.4.4 (from 3.6.7) , the results were the same. I have also configured Chosen to apply to ALL select selectors for testing purposes. Has anyone found a solution or work around to this issue?

1 Answer 1


I had a similar issue with a recent OpenAtrium update (2.50). Apparently Chosen changed how it gets applied to fields, and this caused it to be turned off for select fields. In my case, it was as simple as visiting admin/structure/types/manage/<content-type>/fields/<field-name> and setting the option "Apply Chosen to the select fields in this widget?" to "Apply." This is done on a field-by-field basis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.