CalcBuilder Forum

Add predefined mask in text input

User moon_1480 2014-02-20 23:27:10

Hi,

I need for my project to add a predefined mask in text input.

I had it in js file ; /www/modules/mod_calcbuilder/assets/js/jquery.meio.mask

Line 142 : 'mymask' :{mask:'AA-999-AA-999' }, ...

But there didn't work.

I see which certain mask not appear in the choice like cpf (cadastro nacional...)

Have you a solution for my problème ?




Thank's

Moonsoft support 2014-02-21 09:54:22

Hello,

Instead of creating a new mask in js file, did you try to write the mask in the text field on the right of the mask property inside field configuration?

Regards,

User moon_1480 2014-02-23 17:37:44

Hello,

OUPS ! I don't see it's possible to do this.

It's work like a charme.


Thank's a lot

Moonsoft support 2019-01-16 14:14:31

Hello

I needed to have entered number formatted with input mask like this 999,999,999 (integer us)
And to allow entering numbers only. Input mask option is used for tasks like that.

In order to do so in your system - fields needs to be set as text type,
because when field is set as number, there is no input mask available as option.

Problem: when I change field from from number type into text type, to use input mask,
calculation doesn't work any more.

Any suggestions how to have both input mask and calculation ability?

Thanks,
Regards

Moonsoft support 2019-01-17 09:08:03

Hello,
yes, if you format the numbers, they are no longer numbers, but plain texts, either for php or the excel cell. In order to make further calculations with such formatted values, you would need to convert them back to numbers, and then launch your operations. If you have your math in php formulas you could just remove all the ' , ' characters and you will get a valid number again. If you use an excel file, you could also replace the commas, and/or use any built in function like VALUE to extract the number from that formatted text. Here we found some tips to get a number from a formatted text using excel formula:

https://www.ablebits.com/office-addins-blog/2018/07/11/excel-value-function/

Hope this helps, regards

...
List Manager

Build different lists for your site

Buy now!
...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!