505
Views
8
Comments
Solved
[Custom Input Masks] Newly installed Custom Masks from Forge doesn't work
Question
custom-masks
Web icon
Forge asset by Sara Gonçalves

I freshly installed the Custom Masks component, published, and it does not work.  I'm using the latest Chrome version.  On the Examples screen, Submit does not fire when clicked (I verified this by putting a breakpoint on the Submit action - nothing happens).  I can change the submit method to Submit from Ajax Submit and then it will fire.  Then when it does fire, the value of the MaskCurrency, which is the one I am testing, is not assigned the Price variable.

UserImage.jpg
David Austin
Solution

I got the currency mask to work using AdvancedOptions set as follows:

"{removeMaskOnSubmit:true,autoUnmask:true}"


UserImage.jpg
David Austin

David Austin wrote:

I got the currency mask to work using AdvancedOptions set as follows:

"{removeMaskOnSubmit:true,autoUnmask:true}"


In addition, I used these options to get zeroes to display after the decimal with the help of Marcelo's input above and this post:

"{removeMaskOnSubmit:true,autoUnmask:true,placeholder:""0"",digitsOptional:false}"


2018-03-20 11-51-40
João Bernardes

David Austin wrote:

I got the currency mask to work using AdvancedOptions set as follows:

"{removeMaskOnSubmit:true,autoUnmask:true}"



it worked for me. Thank you! 

2019-05-22 11-30-09
Marcelo Ferreira

Hi David,

Can you share an espace of what are you trying to do so we can check whats going on?

About the submit fire I dont know what could be happening, 

About the not assigning you are using a mask and the price variable is a decimal correct? You need to use {autoUnmask:true} as advanced Option

Regards,

Marcelo


UserImage.jpg
David Austin

Hi Marcelo.  I downloaded the Forge component and ran it without any modifications to get these defects.

2019-05-22 11-30-09
Marcelo Ferreira

Hi David,

I did the same and is working for me. That's why I asked if you can provide an example of what are you doing or at least tell us what kind of mask are you trying to achieve.

But I think if you use the below string in the advance options of the MaskCurrency it will solve your problem

"{autoUnmask:true, placeholder:""0"",digitsOptional:false}"

Regards,

Marcelo

UserImage.jpg
David Austin

I modified Examples screen and removed everything except the currency input.  It looks like the validation for the currency is malfunctioning.  I have currency entered but it says "Currency expected!".  I changed the submit button to "submit" instead of "ajax submit" so it will trigger.  OML attached.


CustomMasksDavid.oml
2019-05-22 11-30-09
Marcelo Ferreira

Hi,

Looks like the autoUnmask doesn't work for submit. You need to use removeMaskOnSubmit instead.

Regards,

Marcelo

UserImage.jpg
David Austin
Solution

I got the currency mask to work using AdvancedOptions set as follows:

"{removeMaskOnSubmit:true,autoUnmask:true}"


UserImage.jpg
David Austin

David Austin wrote:

I got the currency mask to work using AdvancedOptions set as follows:

"{removeMaskOnSubmit:true,autoUnmask:true}"


In addition, I used these options to get zeroes to display after the decimal with the help of Marcelo's input above and this post:

"{removeMaskOnSubmit:true,autoUnmask:true,placeholder:""0"",digitsOptional:false}"


2018-03-20 11-51-40
João Bernardes

David Austin wrote:

I got the currency mask to work using AdvancedOptions set as follows:

"{removeMaskOnSubmit:true,autoUnmask:true}"



it worked for me. Thank you! 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.