# Clearing Custom States

**URL:** <https://forum.bubble.io/t/clearing-custom-states/352226>\
**Category:** Need help\
**Created:** [December 15, 2024, 7:22pm UTC](https://forum.bubble.io/t/clearing-custom-states/352226 "2024-12-15T19:22:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![senecadatabase](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/senecadatabase/32/260991_2.png) [@senecadatabase](https://forum.bubble.io/u/senecadatabase)\
**Post date:** [December 15, 2024, 7:22pm UTC](https://forum.bubble.io/t/clearing-custom-states/352226/1 "2024-12-15T19:22:53Z")

</div>

So I’m back working on custom states.

I think I’ve read everything there is about clearing a custom state.

I’ve read to set the state and leave it blank and it will empty it. It does not.

I’ve read to just leave a space and it doesn’t work.

I think there should just be a ‘clear’ for the custom state.

So, maybe I’m overthinking this…

but can someone tell me how to clear a custom state?

I have a create a listing page and edit page and I need to clear the custom state after the listing is created or edited so when the next listing is created or edited it won’t still show the contents of the current state from before.

I just cannot figure this out.

---

<div class="post-metadata">

**Author:** ![senecadatabase](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/senecadatabase/32/260991_2.png) [@senecadatabase](https://forum.bubble.io/u/senecadatabase)\
**Post date:** [December 15, 2024, 8:19pm UTC](https://forum.bubble.io/t/clearing-custom-states/352226/2 "2024-12-15T20:19:40Z")

</div>

So for anyone else with this problem…

I did go back and see there was a :minus list.

Not sure how I’ve overlooked it for so long.

---

<div class="post-metadata">

**Author:** ![ihsanzainal84](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ihsanzainal84/32/245932_2.png) [@ihsanzainal84](https://forum.bubble.io/u/ihsanzainal84)\
**Post date:** [December 16, 2024, 12:45am UTC](https://forum.bubble.io/t/clearing-custom-states/352226/3 "2024-12-16T00:45:57Z")

</div>

Hmm… I’ve do not recalling having issues with just setting states blank to clear them.

Do you have any default values set?

---

<div class="post-metadata">

**Author:** ![mitchbaylis](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mitchbaylis/32/122860_2.png) [@mitchbaylis](https://forum.bubble.io/u/mitchbaylis)\
**Post date:** [December 16, 2024, 2:01am UTC](https://forum.bubble.io/t/clearing-custom-states/352226/4 "2024-12-16T02:01:10Z")

</div>

the issue is that you’ve got a default in the state…

this catches me all the time. if you set a default in the state then when you “clear it” it refills it with the default which means that you can’t ever clear it

if you need a default then push it into the state on page load or button click. I never use state defaults due to this issue of not being able to clear them

the same is not true for fields… it’s one of those “bubble logic quirks” that doesn’t make any sense

---

<div class="post-metadata">

**Author:** ![senecadatabase](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/senecadatabase/32/260991_2.png) [@senecadatabase](https://forum.bubble.io/u/senecadatabase)\
**Post date:** [December 16, 2024, 2:47am UTC](https://forum.bubble.io/t/clearing-custom-states/352226/5 "2024-12-16T02:47:33Z")

</div>

Actually, I have ‘on page load’ and I set the custom state.

Is that considered a default value?

I tried everything to clear it and then discovered the :minus list which is working.

Added: As far as leaving the state blank to clear it, it didn’t work. I also came across a couple of posts on the forum that said they had the same problem with just leaving it blank.

---

<div class="post-metadata">

**Author:** ![mitchbaylis](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mitchbaylis/32/122860_2.png) [@mitchbaylis](https://forum.bubble.io/u/mitchbaylis)\
**Post date:** [December 16, 2024, 3:49am UTC](https://forum.bubble.io/t/clearing-custom-states/352226/6 "2024-12-16T03:49:28Z")

</div>

ah yes, there is an issue with the “clear list” and leaving a list empty you have to use minus list

I had a similar issue with clearing a list on a data field - had to use set list to blank instead of clear list

---

<div class="post-metadata">

**Author:** ![ihsanzainal84](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ihsanzainal84/32/245932_2.png) [@ihsanzainal84](https://forum.bubble.io/u/ihsanzainal84)\
**Post date:** [December 16, 2024, 12:38pm UTC](https://forum.bubble.io/t/clearing-custom-states/352226/7 "2024-12-16T12:38:18Z")

</div>

Ah okay! Yeah that’s an issue I experience too.

What I always do is use a blank list state (of relevant type) and point the state list I’m updating to that.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [February 23, 2025, 7:23pm UTC](https://forum.bubble.io/t/clearing-custom-states/352226/8 "2025-02-23T19:23:51Z")

</div>

Closed on February 23, 2025, 7:23pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
