# Resetting Initial Value on Input Field After Cancelling Edit

**URL:** <https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287>\
**Category:** How do I?\
**Created:** [November 8, 2023, 8:03am UTC](https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287 "2023-11-08T08:03:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/tim/32/6425_2.png) [@Tim](https://community.weweb.io/u/Tim)\
**Post date:** [November 8, 2023, 8:03am UTC](https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287/1 "2023-11-08T08:03:04Z")

</div>

Hey WeWeb community,

I’m currently looking for a solution regarding an input field. My input has an initial value and at first, `readOnly` is set to `true` . When the edit mode is activated, `readOnly` switches to `false` . This allows for new input to be entered into the field. However, if the editing is cancelled (with `readOnly` returning to `true` ), the new input remains in the field (even though it isn’t saved in the backend). Is there a simple way to reset the input field to the initial value when the editing is cancelled? Am I missing something here? 😄 I’d like to avoid reloading the page if possible.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Tim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/tim/32/6425_2.png) [@Tim](https://community.weweb.io/u/Tim)\
**Post date:** [November 8, 2023, 9:11am UTC](https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287/2 "2023-11-08T09:11:36Z")

</div>

Alright, I did overlook a straightforward solution. 😄 In the workflow, when toggling the `readOnly` state, there is an option `reset variables value`. Within the values, the input field appears and can indeed be reset.

Best regards!

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [November 9, 2023, 8:48am UTC](https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287/3 "2023-11-09T08:48:36Z")

</div>

Nicely done! Thanks for taking the time to share the solution 🤗

---

<div class="post-metadata">

**Author:** ![se.belobrov](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@se.belobrov](https://community.weweb.io/u/se.belobrov)\
**Post date:** [July 8, 2024, 9:22pm UTC](https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287/4 "2024-07-08T21:22:09Z")

</div>

But this does not work if this input is in the list. And it turns the weweb into hell

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 9, 2024, 6:15am UTC](https://community.weweb.io/t/resetting-initial-value-on-input-field-after-cancelling-edit/5287/5 "2024-07-09T06:15:23Z")

</div>

actually here is when weweb allows you to manage lists (unlike other nocode tools).  
have a look [here](https://community.weweb.io/t/checkboxes-within-a-collection-list/1379/3) for an example about how to handle inputs in a list, including resetting all of them
