How can I create an input where you can only type letters, numbers and maybe underscores? This is so I can use the usernames in the URL of my application. (For example https://example.com/p/[username]
Make the username the slug of the user/profile type
If you want to limit the users ability inside of an input element to only use a combination of numbers, letters and underscores but not special characters which would not translate into the URL properly, you can’t.
One thing that I do is I create a username from the users email address, by extracting the domain name from their email address.
What you can do is use @johnny suggestion of using the slug on the user type so that no two users can have the same username if by chance they use the same email handle for different email domains.
Bubble will automatically add a numeric value to the slug if one already exists of the same data type.
This topic was automatically closed after 70 days. New replies are no longer allowed.