Neeeco
June 11, 2025, 7:08am
1
Hi all,
I’m trying to get IMask [Input Mask Guide | imaskjs ] to work with the new m3 textbox (like they did here: Possible to display textbox tel type as (999)999-9999? - Anvil Q&A - Anvil Community Forum ). Works fine on the older textboxes, but since the m3 texbox element does not have a .value
property, it does not work…
Here is a clone link to a minimal example that shows it working on the old textbox, but not on the m3 textbox.
Any pointers would be appreciated, thanks.
1 Like
I would love something like this for percentages and dollar amounts!
Neeeco
June 12, 2025, 5:47am
3
Yup, this library does exactly that Now just to get it to work is the challenge!
brooke
June 12, 2025, 1:16pm
4
Hi @Neeeco ,
You can get this to work by targeting the right dom node. Because the HTML structure of the M3 TextBox is different, it doesn’t work in the same way as the old TextBox.
Using _el = self.with_masking_textbox.dom_nodes['anvil-m3-textbox']
instead should work!
2 Likes
Neeeco
June 12, 2025, 1:47pm
5
Work’s great! Thanks @brooke
2 Likes