HS should also be available as a CCK widget, for at least the content_taxonomy and location fields.

Note: content_taxonomy is already supported via form_alter()ing currently.

Comments

wim leers’s picture

Title: Hierarchical Select as a CCK widget » DROP Task: Expose Hierarchical Select as a CCK widget
Assigned: wim leers » Unassigned
Status: Postponed » Active

Making this a DROP Task. Let's see if we can sparkle some interest … :)

Basically, you only have to implement hook_widget_info() and hook_widget(), and then even only for the content_taxonomy module implementation. The widget itself is of course already written: it's just that it's not yet being exposed as a CCK widget.

You can look at the implementation in the money module for a clear example of what this will look like: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/money/money....

wim leers’s picture

Title: DROP Task: Expose Hierarchical Select as a CCK widget » DROP Task: Offer HS as a CCK widget for the content_taxonomy implementation
wim leers’s picture

Title: DROP Task: Offer HS as a CCK widget for the content_taxonomy implementation » Offer HS as a CCK widget for the content_taxonomy implementation
Version: 5.x-2.0-rc4 » 5.x-3.x-dev
Assigned: Unassigned » wim leers

I've begun working on this now. CCK's hook_widget_settings() has *no context* at all though, it doesn't even have a means to find out on which field you're working… this is a major problem, because for my common_config_form stuff to work, I need to find out *at least* $params (in this case: the vocabulary id).

wim leers’s picture

Making good progress now (finally).

The context problem has been solved (by extracting the context from the URL – ugly, but it works). But another problem has presented itself: CCK's own widget settings mechanism is very limited: it doesn't allow for multiple dimensions of settings. So I still have to let the user do the HS config on a separate form (and separate page).

wim leers’s picture

Title: Offer HS as a CCK widget for the content_taxonomy implementation » HS as a CCK widget for content_taxonomy

Lots of tricky things, but I got it to work. Getting ready for a beta! :)

See http://drupal.org/cvs?commit=116164.

wim leers’s picture

Status: Active » Fixed

Oops!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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