hello,
how can i save in database automatic text from a textbox?
example
$w(“#input1”).value = “Hello World”;
in textbox it shows the text but it does not save in database the hello world, it is just empty.
how can i solve this ?
hello,
how can i save in database automatic text from a textbox?
example
$w(“#input1”).value = “Hello World”;
in textbox it shows the text but it does not save in database the hello world, it is just empty.
how can i solve this ?
Adlan, I am guessing you try to set the value of a text box and then try to save it. It won´t work. Lookup .setFieldValue() on the dataset doc.
i have a booking form with some inputs and in one input i have a automatically calculated price and this price in website it shows but if i submit the form it dont save the price. can i fix this problem with .setFieldValue ?
can u gife me an example with .setFieldValue () pls im trying since weeks to fix that.
Adlan, you are not the first one to run into this problem, and certainly not the last. First read this: https://www.wix.com/code/reference/$w.TextInput.html#value (the .value problem goes for EVERY Wix Input element, text is just an example).
Then, read this:wix-dataset - Velo API Reference - Wix.com
It has all the explanations and example code you need. If you are still stuck after reading and trying, let me know.
now i have problem with CurrentItem
export function button3_click_1(event, $w) {
$w(“#dataset1”).setFieldValue(“price”, $w(“#textBox1”).value);
$w(“#dataset1”).save();
}
thats my code
Now it works. thank you very much !!
Glad you got it working.