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
Comment #1
mark. commentedsubscribed.
Comment #2
jbrauer commentedI 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.
Comment #3
seemas commented>>> 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_selec...
This selects 2nd level term (tid:38->tid:42)
Comment #4
jbrauer commentedGreat! Thanks for the update.
Comment #6
ordually commentedI'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:
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:
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!
Comment #7
srsbl commentedHi,
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
and
but none worked.
Is there any other suggestions?
Thanks,
Comment #8
treehacker commentedI had the same problem on drupal 6 and finally I did a workarround by changing the taxonomy field on node save.
since I don't need the taxonomy list to show up on node creation it works for me.
Here my little module function:
On the page where I have the node creation link I just append the taxonomy ID to the URL via node/add ?regionid=1234
Hope this helps a bit, even if it may not be very correct.... :-)
Comment #9
maximpodorov commentedA simple solution which replaces hierarchical select widget by simple select widget and disables it:
Comment #10
gmario commentedHi to all,
sorry for my english - maybe will not so clear :)
I too have been faced with this problem, and I've wrote a little patch. I have a node with a "hierarchical_select" that must being pre populate in some circumstances. I have only changed this function like that:
to set a field named field_apply_to use this sintax:
hope this helps someone.
a presto
gmario
Comment #11
gangaloo commentedI'm interested in this feature.
Just wondering if there might be a consideration for this feature request?
Comment #12
lincolnbergeson commentedI too couldn't replicate #3, even after following instructions here: https://www.drupal.org/node/228167
Any comments from the developers?