Stop HTMLSnippet from resetting input values that were changed
0
I was implementing a basic formatter function for an input, where the user types in digits and once the correct number of digits are entered, the value gets formatted in a specific way with other characters. This should be simple and easy to implement, however the HTMLSnippet has some internal javascript that will listen to value changes and revert them. In my javascript I attempt to call both stopProgagation and stopImmediatePropagation but this still does not work. I can see the correct value getting placed when pausing with the debugger, but then the HTMLSnippet reverts the input back to just the digits before I applied the format and changed the value via script. How can I prevent this?
asked
Alex Stump
2 answers
1
Hi Alex,
I hope you are using latest version of HTML Snippet, For Javascript better try using JavaScript Actions.
Hope it helps,
Thanks & Regards,
Manikandan K
answered
Manikandan K
0
As Manikandan suggests, a JavaScript Action called from a Nanoflow would probably be the better approach to running JavaScript in this situation. You can call the Nanoflow from a DataView with a Nanoflow DataSource on the page so it triggers automatically when the page loads.