Buy Now
Sign in

Custom input mask CFv6

momentis , February 01 at 14:50
momentis

In CFv5, I could add a custom input mask to the Extra Params of an input field. How can I do this in CFv6, as I do not see that item in the field configuration?

Thanks!!!

Rick

momentis
Does anyone have an answer on this?

​Rick
admin
Hi Rick,
Under the "Advanced" tab, Extra attributes :
data-inputmask:mask goes here
Best regards
Max
If your main question got answered then please mark the answer using the button!​

Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
momentis
Thank you, Max!!
admin
No problems!
Max
If your main question got answered then please mark the answer using the button!​

Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
momentis
Max,
I cannot seem to get this to work. I have tried:
data-inputmask : 999-999-9999
data-inputmask : '999-999-9999'
data-inputmask='mask' : '999-999-9999'
None of which seems to work. What am I doing wrong?

​Rick
GreyHead
Hi Rick,
I tested a few variations in CFv6 but they all seem to throw a JavaScript error in the mask code "VM1149:1 Uncaught SyntaxError: Unexpected token } in JSON at position 15" the block of code is this
                        if (n && "" !== n && (n = n.replace(new RegExp("'","g"), '"'),​
​ j = JSON.parse("{" + n + "}")),​
​ j) {
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
momentis
Okay, I see why nothing was happening. I'll just wait until there's a fix.
Thank you!!!
Rick
admin
Hi,
This works for me:
data-inputmask:'mask':'999-9999'
Best regards
Max
If your main question got answered then please mark the answer using the button!​

Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
GreyHead
Hi Rick,
Checked and Max's latest version works for me too. It is not obvious to me from Max earlier post that the 'mask': part is needed.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much