Arash Soleimani - 2020-05-15 15:38:07 -
In reply to message 1 from BratSadLove
Hi, Thanks for using my class. You can add onClick or onChange to your field JSON object.
Button example:
"myButton": {
"type": "button",
"title": "My Button",
"name":"mybutton",
"onClick":"alert(1);console.log('something')"
}
or
Input example:
"firstName": {
"type": "input",
"title": "First name",
"name":"firstName",
"value": "test",
"onChange":"YourJavascriptFunction(this.value)"
}
<script>
const YourJavascriptFunction = (data) =>{
// do something
}
</script>
If you have any questions, let me know.