Score:0

Cascade dropdown list aka dependent dropdown list

cn flag

Is there any way to make a cascade dropdown list aka dependent dropdown list for a "survey" content type?

Apart from the "survey" content type. I have three other content types: country, state and district. Each of these types are linked by entity references.

In the "survey" content I have created 3 dropdownlists, one for country, state and district. I am filling these lists with content types that I created specially for each one, that is to say, one content type for country, another for state and another for district.

So far so good. But I would like that when I change one of them, the others change dynamically. I have been able to do it with views, but not dynamically. Is there any solution without programming?

Or is there another way to do this?

I have read countless blogs and sites. However, I have not been able to achieve this.

Score:0
us flag

Yes, there is a way to achieve this. One of the best options is to use AJAX dependent drop-down. It requires custom code however. There are some good articles in the net which I saw solving this. You may find a very decent example in the examples module here

What it does is to build one dropdown and on changing its value, to calculate the options for the next one and so on. I used such technique several times in my projects already.

Good luck!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.