[Custom Input Masks] Mask Currency - Remove default 0
custom-masks
Web icon
Forge component by Sara Gonçalves

Hey All,

I am using the currency mask to one of my input box.

By default, the value "0" is added to it during the runtime.

Is there any way to make it blank?

Thanks,

Keerthi Vasan

Keerthi Vasan wrote:

Hey All,

I am using the currency mask to one of my input box.

By default, the value "0" is added to it during the runtime.

Is there any way to make it blank?

Thanks,

Keerthi Vasan

 Hi Keerthi,

Change the data type of variable as "Text" instead of "integer" which you are using to bind with you input variable.

As the default value of integer variable is "0" that why you are getting "0" in your input field by making it "text" we can assign empty value there and make the input type of input field as "number" so that it will allow user to enter only numeric value. Also while submitting the value of that fields user "texttointeger()" function to convert the data type of value.

Hope this will work for you.

Regards,

Vipasha

Vipasha Sharma wrote:

Keerthi Vasan wrote:

Hey All,

I am using the currency mask to one of my input box.

By default, the value "0" is added to it during the runtime.

Is there any way to make it blank?

Thanks,

Keerthi Vasan

 Hi Keerthi,

Change the data type of variable as "Text" instead of "integer" which you are using to bind with you input variable.

As the default value of integer variable is "0" that why you are getting "0" in your input field by making it "text" we can assign empty value there and make the input type of input field as "number" so that it will allow user to enter only numeric value. Also while submitting the value of that fields user "texttointeger()" function to convert the data type of value.

Hope this will work for you.

Regards,

Vipasha

 Hey Vipasha,

Thanks for the reply, i have already tried that logic but it doesn't works. 

(Component By default assigning it as 0 even if we change it to TEXT data type & changing the Input type as Number is not working as expected for the currency delimiters)


As a workaround i did a binding of input through a condition by integrating the mask only when on focus of the input value. It Works for Me

* Used Fake notify widget and called that in OnFocus of input extended property


Thanks,

Keerthi Vasan

 


i having the same problem like above, i am using the mask currency in InputMaskReact in Reactive, in the input field defaultly adding zero (whenc click that input box and also hovering the input box).So please help me and i need to fix this problem in short time.

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