# Clear values when closing overlay

**URL:** <https://community.glideapps.com/t/clear-values-when-closing-overlay/66923>\
**Category:** Ask for Help\
**Created:** [October 12, 2023, 8:16am UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923 "2023-10-12T08:16:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)\
**Post date:** [October 12, 2023, 8:16am UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/1 "2023-10-12T08:16:45Z")

</div>

Hi,  
For use case where we have an overlay for people to use, e.g. key in some data, if the user close the window using the back button or X (close window) … is there a way to reset/clear data user key in?

Thanks.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 12, 2023, 8:43am UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/2 "2023-10-12T08:43:22Z")

</div>

No, but you can clear the values when the overlay is opened.

---

<div class="post-metadata">

**Author:** ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)\
**Post date:** [October 12, 2023, 12:05pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/3 "2023-10-12T12:05:18Z")

</div>

thanks Darren.

This is partial solution as data is user specific …

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 12, 2023, 12:18pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/4 "2023-10-12T12:18:56Z")

</div>

I don’t understand why the data being user-specific has something to do with the problem here?

---

<div class="post-metadata">

**Author:** ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)\
**Post date:** [October 12, 2023, 12:29pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/5 "2023-10-12T12:29:58Z")

</div>

My use case is an event where user can register their interest by indicating the number of seats. This is deducted from maximum seats available. So if a specific user keys in he wants 10 seats and just close the overlay, then the 10 seats are falsely seen as reserved. If user does not come back to the particular event page, then it is stuck there “indefinitely”.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 12, 2023, 12:30pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/6 "2023-10-12T12:30:49Z")

</div>

Is there a reason you don’t add that “interest” in another table to confirm that they want to submit that “interest” for you to see?

---

<div class="post-metadata">

**Author:** ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)\
**Post date:** [October 12, 2023, 12:34pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/7 "2023-10-12T12:34:25Z")

</div>

when they click submit it will transfer to another table … I get what you mean … I can just focus on the confirmed “table” and ignore the ones who add seat without submitting. TQ

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 12, 2023, 12:35pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/8 "2023-10-12T12:35:25Z")

</div>

Yeah, I mean if you intend it to be a form, then you should only consider what has been submitted. And if it’s a user-specific form, I don’t think you want to deal with the hassle of switching users to see what has been input there.

---

<div class="post-metadata">

**Author:** ![Mns\_Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mns_glide/32/2514_2.png) [@Mns\_Glide](https://community.glideapps.com/u/Mns_Glide)\
**Post date:** [October 12, 2023, 12:39pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/9 "2023-10-12T12:39:10Z")

</div>

I thought it would be a good user experience where we can see the seats being reduced as different users key in their intention to attend the event … but if they do not submit then this is the issue we will face. so i thought if we can have an action when user press back button or X overlay, then we have a solution.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 12, 2023, 12:40pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/10 "2023-10-12T12:40:01Z")

</div>

Well, to me, a form is a form, only if they submit then you want to consider that.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 12, 2023, 12:42pm UTC](https://community.glideapps.com/t/clear-values-when-closing-overlay/66923/11 "2023-10-12T12:42:42Z")

</div>

> [@Mns\_Glide](#):
>
> I thought it would be a good user experience where we can see the seats being reduced as different users key in their intention to attend the event … but if they do not submit then this is the issue we will face.

You could still do that, just don’t finalise the count until after they submit.  
So you essentially have two counts - a global count that all users see, and a user specific count that each user sees as they are filling in the form. Keep in mind that because it’s user specific, anything that any user does won’t have any impact on what others see until/unless they submit the form.
