Field element regex

urbido

Member
Hi! I have a phonenumber in field element (987654321) and I want to display it like 987 654 321.. that's okay, I would use Nubmer Format & thousands separator " "... but problem is, when phone number is like +420987654321, +421987654321,... it displays like 420 987 654 321 (missing the '+' symbol). Is there any way to display it like I want (+420 987 654 321), without using php validation? I can't force users to input phone nubmers with spaces...
Thanks!
Stepan
 
But the input mask works for input only, doesn't it? I want user to be able to write 321321321 and see 321 321 321, or write +420321321321 and see +420 321 321 321.
 
One way to do that would be to use a calc element, and display that rather than the actual input field in list view. And have some PHP in the calc which "normalizes" the phone element value.

The only other way would be to use a PHP validation set to "replace" rather than "match", and format the input that way.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top