I’ve got a simple bit of code I can’t get working. It creates an entry into my Collection but the field values are empty - and the text input fields are filled in before submitButton is pressed.
import wixData from 'wix-data';
let toInsert = {
"title": $w("#title").value,
"region": $w("#region").value,
"price": $w("#price").value,
};
$w.onReady(function () {
});
export function submitButton_click(event) {
wixData.insert("Collection", toInsert);
}