Hi,
How can I trigger formatter to update the contents of a field programmatically?
I'm asking because I'm using formatter to display a phone number as (xxx) xxx-xxxx, however it's stored in the database as xxxxxxxxxx. So after a form is saved and reloaded, the value in the field displays as xxxxxxxxxx. I want to tell formatter to immediately update the field so it looks like (xxx) xxx-xxxx again.
The only public function that I could get to trigger an update was .resetPattern(), but it fails when I pass it an array of patterns. Haven't had any luck with the 'private' methods, and I'd rather not use those if possible.
Hi, How can I trigger formatter to update the contents of a field programmatically?
I'm asking because I'm using formatter to display a phone number as (xxx) xxx-xxxx, however it's stored in the database as xxxxxxxxxx. So after a form is saved and reloaded, the value in the field displays as xxxxxxxxxx. I want to tell formatter to immediately update the field so it looks like (xxx) xxx-xxxx again.
The only public function that I could get to trigger an update was .resetPattern(), but it fails when I pass it an array of patterns. Haven't had any luck with the 'private' methods, and I'd rather not use those if possible.
I'm using v0.1.5.
Thanks!