# Setting Input value dynamically

**URL:** <https://community.plotly.com/t/setting-input-value-dynamically/16927>\
**Category:** Dash Python\
**Created:** [December 14, 2018, 12:36pm UTC](https://community.plotly.com/t/setting-input-value-dynamically/16927 "2018-12-14T12:36:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ablochs](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@ablochs](https://community.plotly.com/u/ablochs)\
**Post date:** [December 14, 2018, 12:36pm UTC](https://community.plotly.com/t/setting-input-value-dynamically/16927/1 "2018-12-14T12:36:33Z")

</div>

Is it possible to set the value of the Input component dynamically?

I’m trying set the value to a previous values stored in localstorage.  
The following does not work (gives error: `Error loading dependencies`)

```
@app.callback(
    Output('input-title', 'value'),
    [Input('local', 'modified_timestamp')],
    [State('local', 'data')]
)
def on_data(ts, data):
    try:
        return data['title']
    except ValueError:
        return ""
```

---

<div class="post-metadata">

**Author:** ![DPly](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@DPly](https://community.plotly.com/u/DPly)\
**Post date:** [March 24, 2021, 8:50pm UTC](https://community.plotly.com/t/setting-input-value-dynamically/16927/2 "2021-03-24T20:50:14Z")

</div>

It would be great if someone would reply to this post, even with a link to the docs page that shows how to do it (i.e. test for and load existing localStorage data on app initial pageLoad) .

I haven’t found the information yet either, and here is this brilliant question that summarizes exactly what I am trying to do. Anyone?

---

<div class="post-metadata">

**Author:** ![Emil](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emil/32/31734_2.png) [@Emil](https://community.plotly.com/u/Emil)\
**Post date:** [March 24, 2021, 9:36pm UTC](https://community.plotly.com/t/setting-input-value-dynamically/16927/3 "2021-03-24T21:36:06Z")

</div>

Can you post a complete example demonstrating the issue?
