Displaying phone numbers

Hi all,

I have a two part question.

I have a pop up that displays user data, one of them being a mobile number. I have tried both text and numeric ranges but mobile numbers that start with a 0 do not display correctly. Is there a way to just display a mobile number, regardless of the country it’s from?

My second question: Is it possible to allow users to connect their profile to whatsapp so people viewing the app can contact said user through whatsapp and the mobile number displayed?

Thank you!

  1. What ‘type’ of field are the mobile numbers being stored as in your database?

  2. There are several Whatsapp plugins for Bubble, although I haven’t used them personally so can’t say what you can and can’t do with them - but it might be worth taking a look.

@adamhholmes I have tried both text fields and numeric fields. Neither seem to display the 0 at the beginning. I have also tried text(numeric)

Phone numbers should be stored as ‘Text’ not as numbers, as they are not numbers in any meaningful way, rather they’re just text strings that happen to contain numeric characters.

If you store a phone number as a number it won’t store any preceding zeros as they don’t mean anything or have any value (e.g. 15, 015, 0015, and 00000000015 are all the same number, and will be stored as 15 in the DB).

A text field will store exactly what is input, so whether you write 15, 000015, or 0000000015, the exact input value will be stored.

So check that your mobile numbers are being stores as text and not as numbers, and check that the data on the records is stored correctly.

If you still can’t get it to work, feel free to share some screenshots of your database setup and on page elements so I can see if there’s anything else wrong, or share a link to your editor if you want me to take a quick look.

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