Hierarchical Select Flat List: new mode that doesn't support hierarchies, but does allow usage of the dropbox
derjochenmeyer - May 28, 2008 - 12:45
| Project: | Hierarchical Select |
| Version: | 5.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Wim Leers |
| Status: | closed |
Jump to:
Description
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?

#1
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.
#2
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 usehook_hierarchial_select_form_alter($form_id, &$form)I'd be happy to write up a tutorial once I figured that out for myself.
#3
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.
#4
Now implemented, will be used for http://drupal.org/node/231831.
#5
Automatically closed -- issue fixed for two weeks with no activity.