[Custom Input Masks] [Custom Input Masks] Input auto filling with "-" and mask broken after ajax refresh

Forge Component
Published on 22 Apr by Marcelo Ferreira
31 votes
Published on 22 Apr by Marcelo Ferreira

Hi everyone,

Need your help with the Custom Masks. 

My requirement is the following for a input field

- The first letter should be capitalized (that's why I'm using the Ajax Refresh) 

Only is allowed:

- Letters

- Spaces

- "-"

- '


The issue that I'm encountering is that when I input the char "-" the filed is auto filled with that character and after the ajax refresh those characters are wiped. 

After the Ajax Refresh the mask broke and now every other character is allowed, for example numbers.

Attach you can find the .oml with my solution.

Any help will be appreciated. In advance thanks!

Eugenio Daniel

Hi Eugenio,

When you ajax refresh you need to also include the MaskTest. Create a container with both the textbox and the mask inside and refresh the container.



Hi Marcelo,

Thanks for the tip. That fixed the broken mask. But still i'm experiencing the auto fill of the "-" and the special characters get wipped after the refresh.



Hi Eugenio,

You need to remove this 

SyntaxEditor Code Snippet

removeMaskOnSubmit:true, autoUnmask:true

Looks like this is removing the symbols. I need to check why.

Instead of using the ajax refresh you can also use this 

SyntaxEditor Code Snippet

"{placeholder:"" "", regex: ""[A-Z]{1}[a-zA-Z]|-| |\'{0,49}""}"




Thanks that worked