Slug masked input

I need to create slugs for personal user pages. I’m attempting to use a masked input to restrict the input, allowing only letters and numbers in any order, and to automatically replace spaces with the “-” character. Does anyone know how to create a mask that can achieve this?

Thanks!

Why not let users name those pages with spaces and then below you display what the slug will look like by using our nocode formulas?

Thanks for you sugestion!

I’m checking to see if the slug already exists before allowing it to be created in supabase.
I want each slug to be unique. If there is already one like it in supabase, I want the user to be able to change it to a better name for it.

You can still do it. Have an input with no restrictions, when a person types something it gets converted to slug format below the input and also send a request to supabase to see if there is one like that

Just to know…
Isn’t it possible to give the answer directly in the input with some mask?
In fact, I can already format some things directly in the input. For example, only lowercase characters and no accents. If someone types space or any other character, nothing happens…
My problem is converting spaces directly to “-” and allowing the insertion of numbers at any point in the text.

Is it impossible to do this with masks?
Not that the solution you gave me is not a solution.
It’s just to know if, the way I want to do it, it’s not possible to do it.

I don’t think it’s possible with our masked input, it is with some custom JS

OK.
Thanks very much for your attention an help!

Hi Luka - I’m working on a simliar flow. It seems there isn’t a “replace” function that I can find. What would be the function to use if you wanted to replace the " ", with “_” for a slug?

replace(variables[‘619ca2c2-007b-40ed-8993-91814e8c81e6-value’], " ", “-”)

1 Like