I'm making an app where the user will type his name in the input. I used the Input mask react forge to limit the characters typed by the user to just letters. However, it is not possible to use the space " " in the input so that the user can type his name correctly. How do I enable space in input?
Hi, @Vinicius Perpetuo
You can handle it simply using condition in pattern by applying If(Selected="Name","^[A-Za-z ]+$","^[0-9]+$")
You can refer attachment
Thanks
Mohd Rizwan
You can take reference from below thread,
https://www.outsystems.com/forums/discussion/71459/input-mask-react-how-to-allow-user-enter-space/
Thanks.
Hi Ajit Kurane
The property options in this link's example are not the same as mine. I put a photo attached with the options that appear in my properties.
Hello @Vinicius Perpetuo
You can use input masking and applied pattern "^[A-Za-z]+$" to accept text with space
I have attched the oml for your refrence.
Demo: https://personal-abfdzfhg.outsystemscloud.com/SampleD/Inputmask?_ts=638276384987757014
Thanks Regards
It works, thanks! But I have another problem
On the site I'm making, there are 2 radiobuttons. What I want to do is: If the user clicks on the radiobutton "Name" he can only type letters. If the user clicks on the radiobutton "CPF" he can only type numbers.
For this I created an IF that is receiving the input, in the IF I put: Type query = CPF
So for when it is true, I put a mask of only numbers. And for when it's False, I put the letters only mask.
The tip you sent me worked perfectly. But only with a mask, from the moment I put another mask to filter only by numbers, nothing works. Maybe it's because both masks have the same input as a reference? Can you tell me what it could be?
Hi Mohammed Rizwan
It works, thank you so much!