Custom input mask CFv6

mo momentis 01 Feb, 2018
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
mo momentis 07 Feb, 2018
Does anyone have an answer on this?

Rick
Max_admin Max_admin 07 Feb, 2018
Hi Rick,
​
Under the "Advanced" tab, Extra attributes :
data-inputmask:mask goes here
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin Max_admin 07 Feb, 2018
No problems! 🙂
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mo momentis 14 Feb, 2018
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
Gr GreyHead 15 Feb, 2018
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
mo momentis 15 Feb, 2018
Okay, I see why nothing was happening. I'll just wait until there's a fix.
​
Thank you!!!
Rick
Max_admin Max_admin 16 Feb, 2018
Hi,
​
This works for me:
data-inputmask:'mask':'999-9999'
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Gr GreyHead 16 Feb, 2018
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
de deef73 22 Aug, 2018
Thanks for this solution!
Can I change a mask based on a other dropdown field ?
​
For Belgium the country code = +32
For the Netherlands it's +31
For Germany it's +49
​
I had now as inputmask
​
data-inputmask:'mask':'+32 999 99 99 99'
​
But I want to change it based on a previous dropdown.
This topic is locked and no more replies can be posted.