# Format, store, display US phone number

**URL:** <https://forum.bubble.io/t/format-store-display-us-phone-number/97016>\
**Category:** Need help\
**Created:** [June 13, 2020, 9:19pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016 "2020-06-13T21:19:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seth](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seth/32/61016_2.png) [@Seth](https://forum.bubble.io/u/Seth)\
**Post date:** [June 13, 2020, 9:19pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/1 "2020-06-13T21:19:44Z")

</div>

Seems like this should be super easy, but I just can’t seem to get it right.

How do I:

1. Accept a US phone number from an input that looks like XXX-XXX-XXXX.
2. Store it in the database.
3. Display it on a page in the correct format (XXX-XXX-XXXX).

Notes:  
I have the input’s content format set to US Phone:

 ![Screenshot 2020-06-13 14.11.47](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2845900588ff028f00ae51d8ea24f779d7814134.png)

But when I try to save the number to the database, it won’t let me just format the number as a phone:  
 ![Screenshot 2020-06-13 14.11.10](https://us1.discourse-cdn.com/bubble/original/3X/2/7/272714e72e638cc5be81288ce2fc66bcf202d8a7.png)

I have the field set to type = number:

 ![Screenshot 2020-06-13 14.15.08](https://us1.discourse-cdn.com/bubble/original/3X/c/2/c2b6375331d8eba10499e3deaed095290d679a70.png)

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [June 13, 2020, 10:12pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/2 "2020-06-13T22:12:24Z")

</div>

Hey there 👋

Let me take a stab at it for you. Two ideas:

1. You still save it as a number in your database. Just when you display it on the screen you can choose the number, then click on more. Choose formatted as. Then you can choose phone number formatting.

2. If you really want to save it like that in your database then you can save it as text.

So those are two options for you.

> **Want to learn more?**
>
> [www.nocodeminute.com](http://www.nocodeminute.com)
> 
> ![Presenting](https://us1.discourse-cdn.com/bubble/original/3X/6/5/65f6fab3efed1c82ed9ceb6b067f755e0766996c.gif)

Hope that helps! 😊

---

<div class="post-metadata">

**Author:** ![Seth](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seth/32/61016_2.png) [@Seth](https://forum.bubble.io/u/Seth)\
**Post date:** [June 13, 2020, 10:26pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/3 "2020-06-13T22:26:28Z")

</div>

Okay, thank you, that does seem to work. I guess what was tripping me up is that it doesn’t seem to let me directly format the display text as a phone number.

First it seems I have to format it as a number, then format THAT number as phone number. I would have thought that making the [content format = US Phone] on the input would have eliminated the need to format the number twice on the text display. Not a huge deal, but it seems odd to me, unless I’m missing something?

![Screenshot 2020-06-13 15.19.14](https://us1.discourse-cdn.com/bubble/original/3X/b/6/b60b1443ef245e77932ea54db5765b702be19501.png)

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [June 13, 2020, 10:30pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/4 "2020-06-13T22:30:45Z")

</div>

I’m not in front of my computer at the moment but maybe you need to save it as text to get it to show the option. I just can’t remember at the moment.

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [June 13, 2020, 10:34pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/5 "2020-06-13T22:34:10Z")

</div>

I think you need to save the phone number in your database as text.

Check it out: [Phone number data type not recognized as number](http://forum.bubble.io/t/phone-number-data-type-not-recognized-as-number/31978/4)

The reason it was working the way you have it is because when you say formatted as: it changes the number to a text type.

---

<div class="post-metadata">

**Author:** ![Seth](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seth/32/61016_2.png) [@Seth](https://forum.bubble.io/u/Seth)\
**Post date:** [June 13, 2020, 10:49pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/6 "2020-06-13T22:49:30Z")

</div>

Perfect, thank you! (Not sure why that post didn’t come up when I searched for “phone number” but I clearly need to do a better job searching.)

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [June 13, 2020, 11:00pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/7 "2020-06-13T23:00:28Z")

</div>

No problem. Happy to point you in the right direction. 👍

---

<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:** [August 22, 2020, 9:19pm UTC](https://forum.bubble.io/t/format-store-display-us-phone-number/97016/8 "2020-08-22T21:19:46Z")

</div>

Closed on August 22, 2020, 9:19pm UTC

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