# Update Input value

**URL:** <https://community.plotly.com/t/update-input-value/15417>\
**Category:** Dash Python\
**Created:** [November 7, 2018, 10:02pm UTC](https://community.plotly.com/t/update-input-value/15417 "2018-11-07T22:02:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjFX](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@tjFX](https://community.plotly.com/u/tjFX)\
**Post date:** [November 7, 2018, 10:02pm UTC](https://community.plotly.com/t/update-input-value/15417/1 "2018-11-07T22:02:34Z")

</div>

I have two dcc.input’s with id’s “a” and “b”. I would like to have a callback that updates b when a is changed.

I wrote the and it will not update the value…

import dash  
import dash\_core\_components as dcc  
import dash\_html\_components as html

app = dash.Dash( **name** )

app.layout = html.Div([  
dcc.Input(  
id=‘input-a’,  
type=‘number’,  
value=9,  
),  
html.Div(id=‘output-a’),

```
dcc.Input(
    id='input-b',
    type='number',
    value=9,
),
html.Div(id='output-b')

```

])

@app.callback(  
dash.dependencies.Output(‘input-b’, ‘value’),  
[dash.dependencies.Input(‘input-a’, ‘value’)])  
def callback\_a(dropdown\_value):  
print(dropdown\_value)  
return 8

if **name** == ‘ **main** ’:  
app.run\_server()

---

<div class="post-metadata">

**Author:** ![narragansett](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@narragansett](https://community.plotly.com/u/narragansett)\
**Post date:** [November 28, 2018, 2:20pm UTC](https://community.plotly.com/t/update-input-value/15417/2 "2018-11-28T14:20:44Z")

</div>

I’ve discovered the same issue. I’m guessing there is a specific restriction regarding dcc.Input, but a brief description of why this doesn’t work would be helpful.

thanks!

---

<div class="post-metadata">

**Author:** ![nedned](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/nedned/32/8795_2.png) [@nedned](https://community.plotly.com/u/nedned)\
**Post date:** [December 20, 2018, 3:38am UTC](https://community.plotly.com/t/update-input-value/15417/3 "2018-12-20T03:38:20Z")

</div>

The issue might be that you only have one callback but two different Dash components that should be registered as inputs. See the section " All Dash Core Components in a layout should be registered with a callback." in the [Dash FAQs](https://dash.plot.ly/faqs)

You should have a callback with `input-b` as an input.
