Learn Bubble with 500+ tutorials, courses & AI Assistant ✨

Limited time launch offer get $80 off today

0 days 0 hours 0 minutes 0 seconds
SAVE $80 NOW
Planet No Code logo
Bubble.io CoachingFounder MentoringSponsorships
LoginLearn Bubble.io

How to use Custom States in Bubble including 2 examples

In this Bubble tutorial we explain how to use Custom States with Bubble, why Custom States are useful and demonstrate two Bubble app examples of how I use Custom States in the Bubble apps I build.

Join now $19/monthLearn more
Get 500+ tutorials, a No-Code AI Assistant, 4 premium courses, and everything you need to build faster!
How to use Custom States in Bubble including 2 examples
Explore these topics...
Design
Checkbox
Conditional statement
Database
Custom States
Workflow
Minus item
Plus item
Set list
Set state
Icons

With just this tutorial learn...

Unlock custom state magic: Learn how to create dynamic checkboxes and temporary lists in Bubble's custom states tutorial!

Master Bubble workflows: Discover how to build powerful workflows for checkboxes and user selections using custom states.

Elevate your Bubble skills: Transform basic forms into interactive experiences with custom states - no database clutter!

With membership you'll...

Learn how to build a ChatGPT Clone, Custom CRM for your business & SaaS Marketing website with Webflow & AI.

Unlock 500+ Bubble tutorial videos with AI powered Q&A.

Debug your Bubble app instantly with our custom trained No Code AI Assistant.

Join now $19/month
Risk-free! 14-day money-back guarantee. Cancel anytime.

Introduction to Custom States in Bubble

I've noticed in the last week or two we've had a lot of searches through our website planetnocode.com on the topic of custom states so I thought I would take five ten minutes to record the video to demonstrate how and when to use custom states in Bubble and why they can be really helpful.

Using Custom States for Checkboxes

So the first use case is going to be a checkbox. Imagine I've got here like a registration form and I'm going to put in another field and instead of using the default checkbox input here that Bubble provides because it's tricky to style I'm going to use an icon instead. I'm going to make this quite big and well ugly just so that it illustrates the point. So there I have a checkbox and let's give it a label like on a sign up form and sorry a sign in form you could have like remember me. Let's just change this to a row and center that and not the content the and that's pretty good.

Benefits of Custom States

Okay so the custom states are really good at a really good way of storing data that isn't needed in your database so you can use a custom state to avoid having to create additional fields leaving your database much more lean and clean and also it's for data which it doesn't matter if the data is only stored whilst the user is on the current page because a custom state loses its data if the page is refreshed or the user visits another page and then comes back.

Creating Custom States

So custom states are created like this they can be created on any elements including the page itself but for simplicity's sake I'm going to label this form field and we click on the eye icon and then go add a new custom state and I will call this remember me and custom states can store any of the existing database types that you have in your Bubble app but for this I just need it to be yes or no and the default is going to be no and so I want to set this up so that when the user clicks on this field I am going to change the custom state of form field there it is to yes.

Setting Up Workflows for Custom States

Okay I also need to sort out the reverse this now I like to use color coding here so that if I'm doing something positive I make it green copy and pasting it and if I'm doing something negative I make it red so this one is going to be change value to no but in order to at the moment both of these workflows will run at the same time so I need to create an only when statement so only when form field so this is taking it from yes to no so it's only when form field is yes take it to no and I can copy and paste this expression then invert it is no take it to yes okay that's the those are the workflows required for a custom field but nothing's going to show up on the front end here so I need to add a conditional statement to my icon so when form field remember me is yes I want to change the icon I think font awesome call it check okay and I can preview it there makes it checked and let's refresh our preview so I can click anywhere in this group and you can now see my icon changes and I could do this with any other icon plugin that's available Bubble it just broadens what I can do with a checkbox and it also means that I can make other like clicking on any other group can do the same thing because it's working on a custom state rather than working on an actual like HTML checkbox element which this is so that's one use.

Using Custom States for Temporary Lists

Another use is if the if you want to create a temporary list for like a user to select different items so let's have a look I'm going to use an option set I've already created called availability and I've got three options here mornings afternoons and evenings so let's create a repeating group that shows my availability option set and I wanted to show all of them there's just three of them let's place a label in there so count cells availability display so that will allow me to list my mornings afternoons and evenings and in fact I'm going to copy and paste the checkbox so I also want to use that change the cell to a row I'm going to group these because I same as here I need to have a group in order to create a on click workflow so group those into a row okay let's preview that let me put it in the middle and let's preview it.

Implementing Custom States for User Selection

Okay so I want the user to be able to click on when they're available but I only want that data saved to the user when they click submit so this is a perfect use case for custom states because I can save the selection that the user has taken as a custom state rather than saving it right to the database so I now need to create a new place to store the custom state now I can store on repeating on the repeating group just like any element on the page but they can get a little bit confusing so actually I will do that because it will demonstrate what I'm pointing out is quite confusing so let's call this selected availability and then this is of type availability and it's a list so that the user can choose more than one morning and afternoon for example then let's work out a workflow action.

Setting Up Workflows for List Custom States

So when this is clicked set state of now my custom state stored in my repeating group selected availability and one of the differences when working with custom states compared to working with when working with custom state lists compared to working with database lists is there is no set list add list option available in this field here in the Bubble editor but there is a workaround I simply recall and this is where it's a little bit confusing if I choose this top option here this is everything that's in the repeating group regardless of how the user interacts with it I need to choose this one because this is my custom state and then I can go plus item current cell's availability let's work the work out the only when statement here so that would be only when can't be spare that you remember select the custom state doesn't contain current cell's availability so this is my adding something in action so I'll make it green and then I can just copy and paste it and thought with that so that I this is just a tiny bit of optimization I put my only if statement in the step here but it's probably better to put it up here to stop the whole workflow from running instead so that's clear that and then so there's no confusion I'll just delete that right so we have my only when statement there runs this let's duplicate this workflow and so this is what does contain right and then invert this as well minus okay.

Connecting Custom States to User Interface

The last thing I need to do is connect up the conditional statement for the appearance of my check box so this will be when repeating group availability select availability remember custom state not my full list from the repeating group contains count groups availability change it to a plus so now I click it updates the custom state how do I save that to the user let's make changes to current user let's see if I've already got an availability I do availability so availability I can use either set list or add list here set list overwrites the existing list whereas add list will add this new list to an existing list if it's present in this field availability so set list will do and then repeating group availability remember if I choose this one it's going to add all three regardless of the check boxes the user has checked so I go selected availability so there we have it in slightly more than 10 minutes but still a brief video two really helpful use cases for custom states demonstrating how to use custom states in Bubble and yeah two really useful cases of using custom states in Bubble.

Table of contents

Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Your No-Code Journey Starts Here

The best way to learn Bubble.io?

Build No Code Confidently

No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.

Find every solution in one place

No more searching across platforms for tutorials. Our bundle has everything you need, with 500+ videos covering every feature and technique.

Dive deep into every detail

Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.

Monthly
Yearly
Member
Accelerate your Bubble app to launch
$99 / month
$19/month/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now
Member
Accelerate your Bubble app to launch
$990 / year
$149/year/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now

Frequently Asked Questions

Find answers to common questions about our courses, tutorials & content.

Do I need any coding experience?

No. Our Beginner Essentials course and AI No-Code Coach are designed for total newcomers. You’ll learn Bubble.io step by step - no coding required.

How does the AI No-Code Coach work?

Simply type your question in plain English, and our AI taps into the entire video library to recommend the exact lessons you need. It’s like having a personal instructor on demand.

How long can I access the content?

As long as you’re subscribed! With our monthly subscription, you get unlimited access to all 500+ videos, our growing course library, and the AI No-Code Coach.

What courses are included

Your subscription includes:

  • Bubble Beginner Essentials – Get up and running fast.
  • Build a ChatGPT Clone – Integrate AI into your no-code apps.
  • Build Your SaaS Website with AI – Learn to create a scalable startup site.
  • Develop a Custom CRM App in Bubble - Learn database relationships with a CRM.

Plus, new tutorials every week!

What if I get stuck on a lesson?

The AI No-Code Coach is your first stop for instant answers. If you need deeper help, you can book 1:1 Bubble coaching for expert guidance.

Do you offer a money-back guarantee?

Yes! If you don’t see real progress within 14 days, let us know, and we’ll issue a full refund—no questions asked.

Can I cancel anytime?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

What if I want more than just tutorials & courses?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

If you’re serious about building a successful SaaS startup, check out Mastery—our intensive mentorship program. Mastery goes beyond Bubble.io development and includes:

  1. 1:1 mentorship to fast-track your progress
  2. Marketing strategies tailored for no-code founders‍
  3. Product management insights to scale your startup‍
  4. Personalized support from experienced founders

‍

Still have questions?

Reach out to our dedicated team.

Contact
Services
Search Bubble TutorialsBubble.io CoursesBook Bubble.io CoachingApply for Mastery
Latest Bubble tutorials
Rerank Text By MEANING With Cohere In Bubble.io Step by Step!
Unlock RAG Providers for NO CODE AI App Development TODAY!
Better Tables with Built-in Search and Sort By in Bubble.io
Partnerships
Flusk.eu
VectorShift
Comnoco
Plumb
Toddle
Whereby
Get started with no code
AI Powered No Code AppsNo Code Web ScrapingBubble.io Plugin tutorialsBubble API Connector tutorialsStudent & Teacher DiscountBest tools for no coders
Follow us
Youtube
X
LinkedIn
Planet No Code logo
In partnership with
Queen Mary University of London Logo
© 2024 Planet No Code. All rights reserved.
Privacy PolicyTerms of ServiceCookies SettingsContact Us