I need to use input from textbox ID to search update location and textbox Value to increased value in DB.
export function button1_click(event) {
// …
let toInsert = {
“ID”: “C003”, //how to get input from textbox.
“value”: 10 //how to increased value in DB such as DB has value 15 then i add 10
//DB must increased value to 25.
};
thank you for help, but i have some problem in editor my code is fine. but in preview system say
Error: Can’t use $w for selection components before the page is ready.
I have a last question.
My textbox input is number type, but when insert to DB it change to string.
How to fix it.
My code.
const inID = $w(‘#idSe’).value;
const inValue = $w(‘#input1’).value; // this is textbox input value number.
let toInsert = {
"code": inID,
"value": inValue
};