# A way to have 2 possible inputs for 1 parameter?

**URL:** <https://talk.observablehq.com/t/a-way-to-have-2-possible-inputs-for-1-parameter/5519>\
**Category:** Help\
**Created:** [September 1, 2021, 8:33pm UTC](https://talk.observablehq.com/t/a-way-to-have-2-possible-inputs-for-1-parameter/5519 "2021-09-01T20:33:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bronna](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bronna/32/6929_2.png) [@bronna](https://talk.observablehq.com/u/bronna)\
**Post date:** [September 1, 2021, 8:33pm UTC](https://talk.observablehq.com/t/a-way-to-have-2-possible-inputs-for-1-parameter/5519/1 "2021-09-01T20:33:53Z")

</div>

Any advice on how to get this to work? I’d like a user to be able to select a state on the map by either clicking on the state, or by selecting it from the drop-down:

> **[Multiple inputs for one parameter](https://observablehq.com/@bronna/multi-inputs)**
>
> To change the state either click on the map, or select from the drop-down. Map data and setup

So far the user can do that, but I’d like for the map and the drop-down to update/sync when the other input is used. I’ve tried adding another layer of variables that hold the state (pun intended) and try to check for changes. For example, if the user clicks on Texas, the drop-down should also change to ‘Texas’ and vice-versa.

Any help would be appreciated! Thanks

---

<div class="post-metadata">

**Author:** ![DanielKerrigan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/danielkerrigan/32/2958_2.png) [@DanielKerrigan](https://talk.observablehq.com/u/DanielKerrigan)\
**Post date:** [September 1, 2021, 9:51pm UTC](https://talk.observablehq.com/t/a-way-to-have-2-possible-inputs-for-1-parameter/5519/2 "2021-09-01T21:51:29Z")

</div>

Here’s an [example](https://observablehq.com/d/06ccd27f53eb767a) that shows one way to do this. It is based on the [Custom Input Example](https://observablehq.com/@tophtucker/custom-input-example) and the [Synchronized Inputs](https://observablehq.com/@observablehq/synchronized-inputs) notebook.

---

<div class="post-metadata">

**Author:** ![bronna](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bronna/32/6929_2.png) [@bronna](https://talk.observablehq.com/u/bronna)\
**Post date:** [September 1, 2021, 11:23pm UTC](https://talk.observablehq.com/t/a-way-to-have-2-possible-inputs-for-1-parameter/5519/3 "2021-09-01T23:23:58Z")

</div>

This is exactly what I was looking for! I’m excited to learn more about custom inputs and .bind. Many thanks!
