# Reset form with repeating item

**URL:** <https://community.weweb.io/t/reset-form-with-repeating-item/14543>\
**Category:** How do I?\
**Created:** [November 14, 2024, 10:29pm UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543 "2024-11-14T22:29:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CyrilK](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@CyrilK](https://community.weweb.io/u/CyrilK)\
**Post date:** [November 14, 2024, 10:29pm UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/1 "2024-11-14T22:29:52Z")

</div>

Hello,

I have a form with repeating multiselect. So when the form is sent, I’d like to reset all the fields but repeated items value variables are not accessible, how can I proceed ?

Thanks !

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 15, 2024, 5:42am UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/2 "2024-11-15T05:42:23Z")

</div>

Hi. You usually should have the results stored in a variable that is bound as an initial value. Then you could reset that. A ton of people actually come to [consult to me](https://broberto.sk/consult) about this, I think I definitely will make a video about this somewhere in the future, it is such a frequent topic 😃

---

<div class="post-metadata">

**Author:** ![CyrilK](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@CyrilK](https://community.weweb.io/u/CyrilK)\
**Post date:** [November 15, 2024, 8:50am UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/3 "2024-11-15T08:50:44Z")

</div>

Thanks Broberto for your quick answer.

I think I did not understand your solution 🫢

I can’t see any storage variable for the multiselect. So I use a onChange trigger to get the event value of each selection in each repeated multiselect input.

I try to bind the initial value of the multiselect to a variable and then reset it when submitting the form, but nothing happens (seems logical, the initial value is only before selections no ?)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 15, 2024, 9:12am UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/4 "2024-11-15T09:12:57Z")

</div>

> [@CyrilK](#):
>
> I try to bound the initial value of the multiselect to a variable and then reset it when submitting the form

You need to bind this to the `Init value` of your select. This way when you reset the variable, the value of the input resets as well.

---

<div class="post-metadata">

**Author:** ![CyrilK](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@CyrilK](https://community.weweb.io/u/CyrilK)\
**Post date:** [November 15, 2024, 10:24am UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/5 "2024-11-15T10:24:13Z")

</div>

I created a button to reset the value (test purpose), but it doesn’t work, did I miss something ?

 ![multiselect binding](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f4dd92ae678e77477bdca8d2f3f02ecb6ebb51f8.jpeg)  
 ![reset var](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/aecf21d1cff61084bc9b6716265c87c3d12b9673.jpeg)

Screen record here : [Watch Enregistrement 2024-11-15 110543 | Streamable](https://streamable.com/19o283)

---

<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:** [November 15, 2024, 10:39am UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/6 "2024-11-15T10:39:51Z")

</div>

maybe [this tutorial](https://community.weweb.io/t/checkboxes-within-a-collection-list/1379/3) can be helpful. it’s with checkboxes but you can apply the same principle to any other input

---

<div class="post-metadata">

**Author:** ![CyrilK](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@CyrilK](https://community.weweb.io/u/CyrilK)\
**Post date:** [November 15, 2024, 12:43pm UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/7 "2024-11-15T12:43:58Z")

</div>

Thank you Dorilama, solved : it was a variable type issue, it needs to be an array and not a text type

---

<div class="post-metadata">

**Author:** ![CyrilK](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@CyrilK](https://community.weweb.io/u/CyrilK)\
**Post date:** [November 15, 2024, 1:22pm UTC](https://community.weweb.io/t/reset-form-with-repeating-item/14543/8 "2024-11-15T13:22:44Z")

</div>

And also : Array type for initial value of text input, and Object type for radio buttons
