Posted by k_mohsen on November 14, 2012 at 3:42pm
Hello
How can I create two or more "Text List" in "Manage Field" that each one depended to other?
Let's I explain it with an example
First list is about name of Countries
United Kingdom
Argentina
Armenia
Australia
…
Second list is about Cities and depended to first list. If you choose "Argentina" in the first list, second one only show the cities of Argentina.
Thanks
Comments
One approach is to use a
One approach is to use a hierarchical vocabulary and the hierarchical select module
Try Hierarchical Select or Reference Option Limit
Try http://drupal.org/project/hierarchical_select for a single vocabulary or http://drupal.org/project/reference_option_limit (2nd has that exact use case outlined)
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.
thanks NotGoddess i read
thanks NotGoddess
i read "Read documentation" for "Reference field option limit" module but can not understand how it work and what i must do.
K.mohsen
First use term reference not list (text) as the field type.
I misread that first post- you can't do limiting (easily) using list field types - that's just an arbitrary list and there is no nice way to relate the two. You need to use taxonomies instead.
go to admin/structure/taxonomy
Create one taxonomy: Countries
Add a few country terms:
United Kingdom
Argentina
Armenia
Australia
Now create a 2nd taxonomy 'Cities'
After creating go back to edit it and you'll see a 'Manage fields' tab just like content types.
Add a new field 'term reference' select your countries taxonomy.
Add a few terms:
Wales, relate to UK
Sydney, relate to Australia
etc. put in enough that you'll see results.
Now go to your content type and instead of 2 list types, add 2 term references. One pointing to 'countries' taxonomy and send pointing to cities taxonomy.
On the second, select the 'option limits' box (it should be checkable)
Create new content. When you select a country (say UK) you should see the second select shift and only those terms you tagged with 'United Kingdom' show up.
There are other ways to do this- as a single nested taxonomy with widgets to limit the levels shown, but try this first to see if you can get the process working.
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.
I would use a single
I would use a single hierarchical taxonomy and the hierarchical select module. It simplifies the setup.
I don't disagree- that's
I don't disagree- that's probably a better way to go, but HS has been flakey (imo) in D7 so I offered both options and that's the one he asked about.
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.
the Hierarchical Select is
the Hierarchical Select is not interactive and after every action you must choose [update].
K.mohsen
just yet i can not
thanks NotGoddess
i did as you say but child list did not update itself. it shows all cities that i inputted.
what can i must do? i stile can not create (parent>child>grand child) list.
K.mohsen