I am getting both a multi-select list and an AJAX hierarchical list of choices....I can't figure out why. See attached picture.

BUT....what I'd actually like is an AJAX, multi-column list that, when the primary column gets selected, the secondary column gets populated with the sub-choices for that primary menu item....any way of making that happen?

Comments

wim leers’s picture

Assigned: Unassigned » wim leers

Which browser is this? Are you sure you're using an unmodified version? Did any Javascript errors occur?

It's because the JS failed to hide the multiple select, for some odd reason.

mdowsett’s picture

Assigned: wim leers » Unassigned

MAC FireFox. No JS errors...and it is unmodified.

I'm getting some other strange behaviours and I can't figure out what's going on...I'm getting frustrated and need to take a break

I am creating a taxonomy term as this hierarchical tree and then adding it as a CCK field to a Bio content type....that should work right?

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have any other JS-powered modules installed?

BladeRider’s picture

StatusFileSize
new42.62 KB
new37.12 KB

I might have some additional information to help trace the cause of this behaviour.

First of all, it is only happening when there are multiple vocabularies assigned to a content-type. If there is only one vocabculary then everything works as expected.

Tested on a clean Drupal install, with jquery_update/jquery_interface modules correctly installed

  • Firefox 3 (Macintosh & Windows XP)
  • Safari 3 (Macintosh)

Attached are two screenshots, one from Firefox and the other Safari.

*** ADDITIONAL INFO *** - AFter posting this ticket, just discovered that the problem goes away if the Categories fieldset is NOT collapsed by default. I was collapsing programmatically in a custom module, and having it expanded by default made the odd behaviour go away.

wim leers’s picture

Hm, does this mean the issue is solved now?

BladeRider’s picture

I guess I'm happy enough now! Will examine source though as I have a feeling the 'bug' may be something as simple as a jQuery .toggle() that's conflicting with the already-hidden standard Taxonomy fields i.e. The behaviour is now reversed.

mdowsett’s picture

StatusFileSize
new10.98 KB
new15.4 KB

I think it is fixed.....I was so frustrated with it the other night, I walked away in disgust after posting this! (well, maybe that is a bit extreme...) :)

All I did today was make sure those field sets were set to 'always open' and it all 'seems' to be working as I had hoped. I'm uncertain if this was the solution but at least it is working! :) I'm afraid to change it back in fears it will break it.

The only other thing that isn't really working now is that when you view the node (in this case a Bio) it shows the term selections as a list instead of the 'table' it shows in the node edit screen. See attachments.

Should I start a new support request for this?

MANY thanks.

wim leers’s picture

Assigned: Unassigned » wim leers

You'll have to theme it as that kind of table yourself. Hierarchical Select just provides an input widget… I guess I could provide a helper theme function to do this though.

mdowsett’s picture

I'm not a coder so I don't have the skills to do so.

I was surprised that wasn't the default result since that is what is posted in the edit screen.

If you could provide the helper theme function, that would be fantastic.

mdowsett’s picture

Status: Postponed (maintainer needs more info) » Active
wim leers’s picture

Version: 5.x-2.1 » 5.x-3.x-dev
Component: Miscellaneous » Code
Category: support » feature
Priority: Normal » Minor
Status: Active » Postponed

Actually, in HS 2, there already is such a function: theme_hierarchical_select_render_dropbox(). Just feed it the information in the right format and it will work.

So, now moving to HS 3.

In HS 3, I use the Forms API to render everything, so it won't be very easy to provide similar functionality there. I've not yet decided whether I want to add support for it there as well, because that'd become… pretty tricky, or at least very ugly for the themer.

Definitely postponed.

wim leers’s picture

Title: both views » Provide helper theme function to render selection on node view in a dropbox table

Better title.

wim leers’s picture

Component: Code » Miscellaneous

On second thought, what you have requested, is a non-issue. All you have to do, is write a mini form like and render it:

$form['some-hierarchical-select'] = array(
  '#type' => 'hierarchical_select',
    '#hierarchical_select_settings' => array(
      'module' => 'taxonomy',
      'params' => array(
        'vid' => $vid,
      ),
    ),
  '#multiple' => TRUE,
  // and so on
);

$output = drupal_render($form);

*But*:
- you still get the hierarchical select then
- the "Remove" links are still there

Which is at the very least confusing.

So if I want to fix all that (i.e. fix the *real* issue), I will indeed have to provide a function to which you can pass the selected items, the parameters for rendering (since you also need to rebuild the hierarchy for just rendering this seemingly simple table) and then it's ready. This is ultra-low priority though (most people want output to be different from input), so this might take … many months. Sorry.

wim leers’s picture

Version: 5.x-3.x-dev » 6.x-3.x-dev
wim leers’s picture

Status: Postponed » Closed (duplicate)