top of page

Forum Posts

bethany
Mar 23, 2023
In Coding with Velo
I'm trying to create an html string and save it into a collection to display on a dynamic page. I have: text = <p1><ul><li><p class="font_8"><a href="https://website.com"><u>Training</u></a></p></li></ul></p1> wixData.get("CourseList", listItems[x]._id) .then((item) => { item.train= text; // train is a rich text field in the collection wixData.update("CourseList", item); }) .catch((err) => { console.log(err); }); But the field in the collection has an error because it doesn't convert the string to rich text. I might be going about this all wrong... any help would be appreciated.
0
1
32
bethany
Jan 11, 2023
In Coding with Velo
Hopefully I can explain this clearly... I have a page set up where people can schedule a time with one of our consultants. I use a repeater to list the available times from a dataset and they can select a time to reserve it. The trouble comes in if more than one person has the page open at the same time - they are both able to select the same time and whoever selects it second overwrites the first person. Because it's part of a repeater, I can't refresh/filter the dataset when they choose a time. How can I confirm that a time is still available when someone chooses it? The page is https://www.dprepsafety.com/schedule The code is: $w("#daveButton").onClick((event, $w) => { $w("#emailD").updateValidityIndication(); if ($w("#emailD").valid) { let itemObj = $w("#daveSchedule").getCurrentItem(); let iDate = itemObj.time; console.log(itemObj); console.log(iDate); const options = { day: "numeric", month: "long", year: "numeric", hour: "2-digit", minute: "2-digit", timeZoneName: "short" }; $w("#daveSchedule").setFieldValues({ "email": $w('#emailD').value, "name": $w('#nameD').value, "department": $w('#departmentD').value }); $w('#daveSchedule').save() .then((response) => { console.log("Done saving the dataset"); $w('#daveRepeater').collapse(); console.log(iDate); $w('#dateOutD').text = iDate.toLocaleDateString("en-US", options); $w('#daveDateGroup').expand(); }) .catch((error) => { console.log(error); }) } }) Thank you!
0
2
53
bethany
Oct 23, 2022
In Coding with Velo
I'd like to allow users to "uncheck" a radio button group, much like you can do with a checkbox group. I have code set up such that when they select the same answer that is already selected, the value is change to null. However, the display doesn't show that change until they click anywhere else on the screen, making it seem like it is still selected. Is it possible to simulate a mouse click? Or is there some other work around so that the user can see that they have cleared their answer when they reclick is?
0
7
148

bethany

More actions
bottom of page