Score:1

Webform custom input mask

ve flag

I'm trying to apply a custom input mask on a webform textfield
What I want is pretty similar to the built-in "Currency (+)" input mask, except I don't want the currency symbol.
However I can't figure out how to simply copy the currency input mask rule in order to modify it.
From the webform source code it seems that the regex used for this input mask is ^\$ [0-9]{1,3}(,[0-9]{3})*.\d\d$ but if I enter this value in the custom input mask field it simply doesn't work
I've also tried inputing 'regex': '[0-9]*' in the custom input mask field and it works for simple regex like this one, but if I copy the currency one as 'regex': '^\$ [0-9]{1,3}(,[0-9]{3})*.\d\d$' it doesn't (as if there wasn't any input mask entered).

I'm surprised the built-in input mask is hardcoded to use the $ sign and nobody seems to want to remove or use another symbol !

Could someone help me please ?
Thank you very much !

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.