hello dear members, I would like to know how to allow an option of a drop-down menu to make a specific action (update, insert or delete) in my form. Put function on an element of the drop-down menu to updates, insertions
I imagined
import wixData from wixData;
if(($w('#myDropdownClasse').option = label2)).on_click (event) {
let toInsert = { "CE1A" : $w.('#input1').value,
"CE1A" : $w.('#input2').value,
}
wix.update ("StatistiqueCE1A", toInsert)
.then((results) => {
console.log(results);
} )
.catch((err) => {
console.log (err);
}
);
}