Remove leading zeros

I don’t know if this is possible with bubble, but if I have a text input and what I’m trying to do is eliminate/drop the leading zeros and save the rest
Example: User types in 0000001234567890, I want bubble to drop the zeros and save: 1234567890 to the database, how would I achieve this?, is this even possible?

Thank you

Try converting it to a number with :converted to number
That should do the trick.

Then it will evaluate to a number, and you can run :formatted as on it to display it in any desired number style.

Or you could change the input type to number - in case that fits in with the rest of your page’s logic.

2 Likes

Thanks a lot, it worked!

1 Like

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