Adds a Chosen field widget for use within Drupals Form API.

There is an existing module which applies the Chosen select field on every select element that matches a specific jQuery selector. My implementation is for Drupal form fields only and is coded much more in the "Drupal Way".

Project page
My project page is at http://drupal.org/node/1927078/

Git Clone
git clone --recursive --branch master supercabbageuk@git.drupal.org:sandbox/supercabbageuk/1927078.git chosen_field

Module is for Drupal 7, I've tested it on the latest release (7.20)

Comments

Anonymous’s picture

Hi

manual review:
- some coding standards regarding documentation. Please refer to here.
- I'd include the library download link also in the requirement string at line 40 in .module

All code seems legit..

cedewey’s picture

I just learned about Chosen and was excited to see this project in the issue queue.

I think though, that it would be best to collaborate and build off of the existing Chosen module (or maybe convince them to work off of yours). It would help avoid unnecessary duplication and be a good opportunity to combine forces.

supercabbageuk’s picture

Could I put forward my point that both modules achieve different end results? The other Chosen module is site wide on all select boxes, mine deals with form widgets.

Edit: Sorry I thought these comments would be nested, this is in reply to cedewey

supercabbageuk’s picture

Thanks for taking the time to have a look, I've changed the documentation as best I can and have updated the requirement string for the status report page. Also picked up on a variable being defined then overwritten two lines later and removed the first unneccessary declaration.

Let me know if there is anything else.

Edit: Sorry I thought these comments would be nested, this is in reply to Propaganistas

cackle’s picture

Status: Needs review » Needs work

Hello,
please correct your git url (to http://git.drupal.org/sandbox/supercabbageuk/1927078.git) and branch from master to 7.x-1.x. And still error by pareview http://ventral.org/pareview/httpgitdrupalorgsandboxsupercabbageuk1927078git.

from manual review:
1. No need to use module_load_include(). Just add it to your_module.info (files[]=your_loading_file)
2. You should implement hook_help().
3. hook_requirements($phase) must be located in .install file.

msmithcti’s picture

I've had a quick look over the code, here's a few things that jumped out at me:

  • Instead of only providing a field widget, could you extend the select element with a flag to use chosen on that select. The field widget could then be an implementation of this as well as being able to be used by other modules/themes.
  • Drupal behaviours should be used when using JS in Drupal.
  • The release branch should be named: 7.x-1.x instead of just 7.x

Other than that it looks great!

klausi’s picture

Status: Needs work » Postponed (maintainer needs more info)

This sounds like a feature that should live in the existing chosen project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the chosen issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

To me this sounds like a future branch of the chosen module.

If that fails for whatever reason please get back to us and set this back to "needs review".

PA robot’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.