[support] Dependent parent->child taxonomy terms in CCK select fields

Victor Trac victor.trac at gmail.com
Mon Dec 3 00:16:32 UTC 2007


Hi all.

I'm on Drupal 5.3, and I've got a CCK node-type that I'd like to add two
select fields, one dependent on the other (e.g. manufacturers & models).
Depending on which manufacturer is selected, the models field select options
are updated to reflect the new choices.  When the form is submitted, I'd
like for the term_node table to store both manufacturer and model
information.  My current vocabulary is set up like this:

Manufacturer1
-Model1-1
-Model1-2
Manufacturer2
-Model2-1
-Model2-2
etc

If I create a vocabulary with manufacturers as parent terms and models as
child terms and associate it with the CCK type, I get a single select field
with every single term of that vocabulary.  In addition, only the selected
term is stored in db (if multiple selects is turned off), so this method
isn't ideal.  I seem to get the same result with the cck_taxonomy module.

Before I start hacking away at a custom model - can anyone suggest a module
or set of modules that can already do this?  If not, can someone provide
some pointers as to how to get the second select field (models) to update
based on the first select field (manufacturers)?  Is using Views + exposed
child terms + javascript trickery the "Drupal" way?

--Victor

-- 
http://www.victortrac.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20071203/f442dd48/attachment.htm 


More information about the support mailing list