I am looking for help trying to figure out why when I try to submit a custom form to a database, code that takes an existing text input value generated from database entry and adds 1 to it won't submit. If I do it manually it will, but when the code generates it, it won't. Screenshots are below.
this first one if you click the left blue button, it will add 1 to the number in the white input box.
here it shows the green bar at bottom that submission was successful
but look at the number under miter saw, it is still the same. I added one to it, although it doesn't show in screenshot.
Here is my code for adding one.
export function add1_mouseIn(event) { let count = $w('#input4').value; $w('#add1').onClick( ()=> { count++; $w('#input4').value = count.toString(); } ) }
This is code for clicking submit.
export function submit_click() { var register = $w('#input4').value; var registered = $w('#input2').value; if (register <= registered) { setTimeout(function () {$w("#dataset1").save();}, 2000); setTimeout(function () {$w("#dataset1").refresh();}, 2000); $w('#button1').show(); $w('#loading').show(); } else { $w('#button2').show(); } }
Thanks in advance!
From :https://www.wix.com/velo/reference/$w/textinput/value