How to use Option Sets with country and phone numbers in Bubble.io
In this Bubble.io video tutorial we show how to use Option Sets in the Bubble editor to store and display phone numbers and country codes. We use an example of a basic CRM to demonstrate the power of Option Sets to storing multiple expressions of the same data and saving this to your user in your Bubble database.
Unlock the power of option sets: Create dynamic country fields with phone codes in minutes!
Master data management: Learn how to effortlessly update and display option sets across your entire Bubble app.
Supercharge your contact forms: Discover the secret to combining country codes and local numbers for seamless SMS integration.
Understanding Option Sets in Bubble.io
Option sets are really powerful when you are going to be displaying the same data or group of data throughout your app. And one example of this may be a country field. So I have the beginnings of a contact manager here, and I'm going to be adding in a country field and showing you how quickly you can then populate and do some really clever things with option sets.
Creating an Option Set for Countries
To begin with, I'm going to go in and create my option set called country. It's under data. And then the different options, I'm going to be USA, UK, and Russia. I'm then going to go back into my data types, and in my contact data type, I'm going to create a field to store a country. And it can be tempting to use text, but you lose all of the power of option sets choosing text. To be able to continue to refer to the data in our option set, we need to choose our option set down here, which was country.
Setting Up Data in the Backend
And then, because I've not got a front-end form set up for this demonstration, I'm going to just do it in the back-end data editor. So the country for Natasha is Russia, Hapegi, it is UK, and Vittoni, it is USA.
Displaying Option Set Data on the Front-end
And then to display that on the front-end, I'm just duplicating this text element. This is just a repeating group showing all of my contacts, and rather than showing the contact's name, I'm going to show the contact's country. And you'll see that it doesn't accept it straight away because your option set is a container of information, and at the very least, it will contain an element called display, an attribute called display. And another way to think of that is your label. So choose display there and hit preview. And you can see it now shows my countries.
The Power of Option Sets: Easy Updates
And to show you the power of option sets, let's say that I've been a little bit too informal, I need to write the full names of the countries. So, change that there, and United Kingdom. And by changing an option set in the option sets menu in the backend of your app, it means that that information is carried forward in all examples. You don't have to go into Tony's record and update it. It's updated because it's attached, the option set is attached inside of the contact known as Tony.
Adding Additional Data to Option Sets
Another example of why this is really powerful and could save you loads of time is let's say there is other data associated with a country, such as a country code used for phones. So I'm creating another attribute, which means that I can go into the United States of America. And I know that the United States of America country code is plus one. The UK is plus four, four. And Russia is plus seven.
Utilizing Option Set Data in Your App
So just like before in here, let's neaten this up a bit. And this time instead of display, I can choose country code. And you might be beginning to see where this is going. This becomes really handy if you're working with a, if you're working with an API for sending SMS messages, 'cause you'll need to have the country code stored somewhere.
Adding Phone Numbers to Contacts
So let's finish building out this table. Back in my data, under my data types, contact, I'm gonna create one called local phone. And I'm not gonna choose number for phone number because if it was to start with a zero, that zero is going to disappear. And I just want the information to remain intact, whatever I enter in that field. So I'm gonna choose text. And then Peggy's local phone, I'm just gonna put some random numbers in here. Oh, so that was Natasha, but random numbers in Peggy now. And random numbers in Tony.
Combining Option Set Data with Contact Information
And so now I can, I go back to contact, local phone, and it will display the local phone. Here's where it becomes quite special. Because in this last field, I'm going to show how you can combine the two together as if you were sending off an API call to include the contacts number. So I can go current contacts, country, country code, and then immediately afterwards, I can go current contact, local phone. And so you can see there that it combines the two elements together.
Creating Clickable Phone Numbers
And to take this one step further, I could use a link. And in this link, I'm going to include that exact same information. Current contact, country code, followed by current contact, local phone. And instead of going to an internal approach, I'm gonna make it external, I'm gonna make it tell. And then if I was to put exactly the same country code, I've then created the link, which if you're on the phone and you were to click it, it would call that number. And it would call that number and it would go through wherever you are in the world because it contains the country code.
Conclusion: The Power of Option Sets
So there we go. That is a summary of the power of option sets. If you're using a country field and showing you how you can add other attributes to option sets such as a country code in order to help build up your application and it could become particularly useful if you're sending SMS notifications.
The best way to learn Bubble.io?
Start building with total confidence
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.

Frequently Asked Questions
Find answers to common questions about our courses, tutorials & content.
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.
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.
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.
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.
Plus, new tutorials every week!
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.
Yes! If you don’t see real progress within 14 days, let us know, and we’ll issue a full refund—no questions asked.
Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.
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 mentorship to fast-track your progress
- Marketing strategies tailored for no-code founders
- Product management insights to scale your startup
- Personalized support from experienced founders