# Multiple dropdown synchronisation

**URL:** <https://discourse.elm-lang.org/t/multiple-dropdown-synchronisation/6405>\
**Category:** Learn\
**Created:** [October 16, 2020, 12:31am UTC](https://discourse.elm-lang.org/t/multiple-dropdown-synchronisation/6405 "2020-10-16T00:31:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Sebastian](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/sebastian/32/98_2.png) [@Sebastian](https://discourse.elm-lang.org/u/Sebastian)\
**Post date:** [October 16, 2020, 12:36am UTC](https://discourse.elm-lang.org/t/multiple-dropdown-synchronisation/6405/2 "2020-10-16T00:36:59Z")

</div>

For this we use a type `ParentChildSelection`

```auto
type ParentChildSelection
    = NoSelection
    | ParentSelected String
    | ChildSelected String String

```

If you select a new country, this will become `ParentSelected Greece`. In that case the view will need to decide what to show for city.

After selecting a city this becomes `ChildSelected Greece Athens`. We keep the id of the parent here for easy lookup.

---

_[View the full topic](https://discourse.elm-lang.org/t/multiple-dropdown-synchronisation/6405)._
