0

I created a content type with different kinds of fields (text, dates, entity relation...). I have 2 dropdown fields (related to 2 taxonomies). I would like that the second dropdown values change based on the value of the first dropdown.

I found the module Dynamic dependent fields (https://www.drupal.org/project/ddf) but after installing (and enabling) it I cannot find any configuration about it.

Could you help me? Thanks

Update: I found the Reference field option limit module (https://www.drupal.org/project/reference_option_limit) but after enabling it I don't know where to set what I need.

webpaul
  • 156
  • 4
  • 18

2 Answers2

1

Having a look at the source of the module, it looks like there should be a setting when editing a select field.
You may want to consider a different module though, such as:
Conditional fields or
Field conditional states

This is assuming that the dropdowns are not just different levels of a single taxonomy, which the other answer about hierarchy select would be a better option.
EDIT, reading your question again I see it is 2 different taxonomies so Hierarchy select probably wont work for you.

2pha
  • 9,798
  • 2
  • 29
  • 43
  • "_it looks like there should be a setting when editing a select field_" ...there isn't :-( – webpaul Oct 07 '14 at 14:11
  • 1
    I just installed the module on a test site. In the settings for a taxonomy reference field it has a new checkbox 'Limit this field's options according to matching field values'. The module seems to work as it should. – 2pha Oct 08 '14 at 04:59
  • I found the checkbox but it is not clickable and i cannot understand the right meaning of the "help text": _This will limit the options presented in this field's widget to only those entities that match the current entity in certain field values. This option is only available when both the current entity bundle and the referred entity bundle(s) have fields in common._ – webpaul Oct 08 '14 at 07:24
  • 1
    I think your second taxonomy needs to have a taxonomy field reference on it, but Im not 100% sure. Ask in the issue queue of the module. – 2pha Oct 08 '14 at 14:50
  • i tried to follow the steps described [here](https://www.drupal.org/node/1596162#comment-6032276) but the checkbox _'Limit this field's options according to matching field values'_ is still not clickable – webpaul Oct 08 '14 at 16:01
  • How do you expect me to help any more than I have? Have you tried the other modules I mentioned? – 2pha Oct 08 '14 at 16:04
  • I appreciate a lot your help, I am still testing. _Conditional fields_ module is still in alpha. I'll try _Fields Conditional States_. Thanks! – webpaul Oct 09 '14 at 07:46
  • I successed in replicating the example of Countries/Cities but i still cannot do it using relations to taxonomies but only to content types. :( – webpaul Oct 09 '14 at 10:03
  • 1
    I succeeded in using relations to taxonomies too in the same way i did for content-types! Thanks a lot! – webpaul Oct 09 '14 at 10:23
0

It is possible and easy to achieve that with this module: https://www.drupal.org/project/hierarchical_select. It is the most popular I think. Maybe you could have a look at it.

I personaly don't know the module you've installed.

This module defines the "hierarchical_select" form element, which is a greatly enhanced way for letting the user select items in a hierarchy.

Djouuuuh
  • 1,147
  • 8
  • 16