Phone number input component

Hi everyone,

As a backend developer, I’m pretty proud of a little UI component I recently built a custom phone number input.

I feel like something like this would be a great as a native component in WeWeb someday!

Amongst the features there is translation or that it automatically reformats the input to ensure a consistent phone number structure no matter how the user types it (with or without spaces, starting with a 0 or not for French numbers, etc.).

It’s based on an npm package, but I had to do a good bit of customization to make it fit seamlessly with my style library.

Here’s a quick showcase if you’re curious:
:backhand_index_pointing_right: Loom video

5 Likes

Hi Hugo, this looks great! :rocket:

Any chance you would like to share your component?

You can submit it to the marketplace:

Hi Agustin,
Just submited the component to the marketplace :wink:

3 Likes

Sick!
Thank you hugo :slight_smile:

Hi Hugo, Looks like your component is great!!!

1 Like

Hi, this looks great! nice work. What is the name of this component in the market place? it’s something i need urgently

Hi, you can find it here : Phone input marketplace

You have a demo available and if you have any questions feel free to ask them here.

2 Likes

This is great Hugo, thanks!

2 questions:
1 - did I do it correctly that, in order to use the inputted value in my form, I created a variable inside the component that’s exposed outside, and then a workflow that populates that variable on change? I couldn’t find the values in another way…
2 - I’m trying to make the input width fill the container to 100% but I can’t seem to find the correct classes to do it through some additional css. Any tips?

Thanks again! It’s a great component :slight_smile:

Hi Niels,
Glad you are happy with my component,

  1. Yes you can use the onChange event or you could use the variable directly available :

  2. This feature wasn’t included in the version currently listed in the shop. I’m actively maintaining the component, and I recently added dynamic width.
    Please email me at the address shown on the component’s demo page in the marketplace, and I’ll send you the latest version.

Sincerly,
Hugo

Thanks Hugo, I’ve sent you an email.

btw for me, that variable isn’t directly available, I can only see it in my log when inside the component, not outside. (the workaround with an extra variable that gets filled throug a workflow works though)

Here’s what gets logged when I’m inside the component:

Hey,

I didn’t remember at first, but it seems I added this exposed variable after the initial upload of the component to the marketplace. In any case, you should now have it in the updated version.

Super happy with this Hugo, thanks!

2 Likes

I need to change the select element’s language to Portuguese so its labels match the user’s browser language.

Hi, the component only support french and english for now.

Your best shot would be to fork the component to add the Portuguese translation.

When I try to fork within weweb.io, this issue happens, preventing me from editing the component.

Do you know how to solve this problem?

Hi Pedro, I meant that you should fork the GitHub component. Please note that this will require some development skills to implement successfully