Uploading to Rich Text in Collection

Sorry to keep posting but I am on a deadline on this massive project and cannot figure out why this won’t work.

I am having some issues with uploading info and editing my collection data with my forms.

  1. I have a form for the client to upload new properties which also has a rich text editor (with html code) and I have the below code of the onClick event. When I hit submit, the console says ‘saving’ but nothing happens? My success and failure text doesn’t show up either.

My add property page:

https://pete092.wixsite.com/book-the-best/add-property

My code:

export function submit_onClick(event, $w) {
console.log(“saving”);
//Send a blank message to the HTML element. This tells the HTML
//element you want it to send you its contents
$w(“#html1”).postMessage(" “);
//Receive the message from the HTML element
$w(”#html1").onMessage((event) => {
//Set the value for the rich text field of the dataset’s
//current item to be the data in the HTML element
$w(“#dataset2”).setFieldValue(“longDescription”, event.data);
//Submit the current item of the dataset
$w(“#dataset2”).save()
.then((res) => {
console.log(“saving”, res);
$w(“#PropertyInfo”).value = null;
$w(“#Location”).selectedIndex = undefined;
$w(“#Type”).selectedIndex = undefined;
$w(“#Guests”).selectedIndex = undefined;
$w(“#Bedrooms”).selectedIndex = undefined;
$w(“#Bathrooms”).selectedIndex = undefined;
});
});
}

  1. I have same problem but on my edit properties page which brings up all the information for the dynamic property. You hit submit but nothing happens.

edit properties page is: https://pete092.wixsite.com/book-the-best/properties/edit/title

And submit code:

export function submit_onClick(event, $w) {
//Send a blank message to the HTML element. This tells the HTML
//element you want it to send you its contents
$w(“#html1”).postMessage(“save”);
//Receive the message from the HTML element
$w(“#html1”).onMessage((event) => {
//Set the value for the rich text field of the dataset’s
//current item to be the data in the HTML element
$w(“#dynamicDataset”).setFieldValue(“longDescription”, event.data);
//Submit the current item of the dataset
$w(“#dynamicDataset”).save()
.then((res) => {
$w(“#PropertyInfo”).value = null;
$w(“#Location”).selectedIndex = undefined;
$w(“#Type”).selectedIndex = undefined;
$w(“#Guests”).selectedIndex = undefined;
$w(“#Bedrooms”).selectedIndex = undefined;
$w(“#Bathrooms”).selectedIndex = undefined;
});
});
}

Jeff, Sam, Tal, Roi, Yisrael, Tal or anyone else if you could please assist!

Sam Tal Roi could you please help?