Download & Extend

Support for Hierarchical Select

Project:Prepopulate
Version:7.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Prepopulate does not work when Hierarchical Select is enabled for taxonomy.

http://drupal.org/project/hierarchical_select

Is there any way to get it working in tandem with Hierarchical Select? If not, are there any plans to add support for Hierarchical Select?

Comments

#1

subscribed.

#2

Status:active» postponed (maintainer needs more info)

I don't see a way offhand to make these work well together. I'm leaving this open, however in case someone else has ideas/patches.

#3

>>> SOLVED
http://drupal.org/node/637998#comment-2298950 prepopulate version worked for me with latest hierarchical select 6.x-3.6 on http://drupal.org/project/hierarchical_select
url that i used:
http://yourdomain.com/node/add/page?edit[taxonomy][7][hierarchical_select][selects][10]=42
This selects 2nd level term (tid:38->tid:42)

#4

Status:postponed (maintainer needs more info)» fixed

Great! Thanks for the update.

#5

Status:fixed» closed (fixed)

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

#6

Status:closed (fixed)» active

I'm unable to duplicate the results of #3. I'm using the current dev version of Prepopulate-6.x-2.x-dev (2011-Feb-25) and the current release of Hierarchical Select (6.x-3.7). From what I can see inspecting the DOM, for hierarchical select (HS), the DOM is not populated with the child taxonomy elements until the user has chosen a parent element and performed a form_submit. For instance, on initial load a node-add page may have a HS vocab addressable with prepopulate syntax of:

edit[taxonomy][3][hierarchical_select][selects][0]=<parent-tid>

In the above, if I substitute with an actual, top level vocab term ID, Prepopulate will select it. Moving a level deeper, though, is the goal using Hierarchical Select. My vocabulary has child terms, but only after I perform a manual submit of the above do I then get a DOM that this prepopulate syntax would find:

edit[taxonomy][3][hierarchical_select][selects][1]=<child-tid>

Without that manual submit my DOM simply doesn't have the data for Prepulate to find, ie. there is nothing in the DOM for the child terms, just the parent terms.

Marking this 'active' since I don't see any way this is happening right now. If anyone has other suggestions please reply!

#7

Version:» 7.x-2.x-dev

Hi,

I'm using drupal 7 and I was able to prepopulate the parent of a term reference field (field_category) using:
node/add/contenttype?edit[field_category][und][hierarchical_select][selects][0]=<parent-tid>

I couldn't, however, find a solution for selecting the parent and the child terms. I've tried

node/add/contenttype?edit[field_category][und][hierarchical_select][selects][1]=<child-tid>
and
node/add/contenttype?edit[field_category][und][hierarchical_select][selects][0]=<parent-tid>&edit[field_category][und][hierarchical_select][selects][1]=<child-tid>
but none worked.

Is there any other suggestions?

Thanks,

nobody click here