Hello to everybody,
I need advice on Wix Forms.
I have a booking form on a dynamic page connected to a CMS item database that works. After sending the form, the customer (including me) will receive a confirmation of the reservation by email.
However, the reserved item is unique and cannot be re-booked by someone else. After submitting the form, I need to mark this item in the database as already occupied. I have a “reserved” field in the database - type boolean, true/false.
I have no idea what code and how to make the change in the database.
I tried to put a button and this code on the page:
export function button16_click(event) {
$w(“#dataset1”).setFieldValue(“reserved”, true);
$w(“#dataset1”).save();
}
But it doesn’t work. Dataset1 is set for write mode.
I also discovered an option to add in Automations the option to perform a NEW TASK - Run the VELO code. But I have no idea what code to enter.
Thanks for any help or guidance on how to do this.