This has maybe been requested before, but i could not find it in the issue tracker...

The multi select option is a really cool feature that would be very handy for CCK multiselect fields. Anybody who knows how to start here?

Comments

wim leers’s picture

Title: Support for CCK select fields » New mode that doesn't support hierarchies, but does allow usage of the dropbox
Assigned: Unassigned » wim leers
Status: Active » Postponed

You have to implement the HS API for each hierarchy you want to use HS for. It cannot be used in a generic way.

What I could do, is allow for a "non-hierarchical HS mode", which just provides you with the ability to use the dropbox, and doesn't support hierarchies. Basically you only have to implement the hook_hierarchical_select_root_level() hook for that, and all other hooks should pretend that there are no child levels.

This will be a 6.x only feature, probably.

P.S.: support for the Location field is planned, and will be probably be added in July.

derjochenmeyer’s picture

Hi Wim, thanks for your help.

I tried to get my head around this. How and where do i start? Can i just place my code in a custom module?

Do i just need:
hook_hierarchical_select_root_level()

hook_form_alter() (for changing the type to "hierarchical_select") or would i rather use hook_hierarchial_select_form_alter($form_id, &$form)

I'd be happy to write up a tutorial once I figured that out for myself.

wim leers’s picture

1) Read API.txt's "hooks" section.
2) Look at the modules/views_taxonomy.module file for an example that's pretty close to what you will be doing.
3) You need to implement root_level(), but also all other, non-optional hooks, most will be super easy though.

wim leers’s picture

Title: New mode that doesn't support hierarchies, but does allow usage of the dropbox » Hierarchical Select Flat List: new mode that doesn't support hierarchies, but does allow usage of the dropbox
Status: Postponed » Fixed

Now implemented, will be used for http://drupal.org/node/231831.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Anonymous’s picture

Sorry, I'm having a bit of a difficult time trying to follow the thread of activity here, I couldn't draw a conclusion.

Is it possible to enable HS Flat List for a CCK multi-select box? If so, please excuse my ignorance but, is there a not-so-dev explanation as to how to do so?

TIA
txcrew