Hi All! Does anyone know how to trigger an event based on a certain number of characters entered into an input?
For example, say I wanted to mimic Framer's Access Code input - once 6 digits are entered, the input is no longer focussed and the project loads. An example would be really helpful as well. Thanks!
There is a property change event. It will fire every time you change the string but it should do it.
Layer.on "change:html", -> If Layer.html.length > 6 //Do stuff
Awesome, thanks! I can't seem to call the input within the class I created, though. Do you think you could help me with that?
I thought this might work:emailField.children.on "change:html", -> if emailField.html.length > 6
but it didn't.
Here's the class I created:https://framer.cloud/tBJkY
Don't mind how wonky it looks in the sim - it actually looks right on my device.