Anyone know how I can populate different dates on a repeater? I have used the below code and have the fields shown coming from the database BUT how do I get different dates in the other fields? There are 12 separate dates for each course.
I have all of this working without the use of the repeater but the code is very long and I’m trying to tidy things up.
let thisCourse = $w("#dynamicDataset").getCurrentItem();
wixData.query("Courses")
.limit(6)
.eq("_id", thisCourse._id)
.find()
.then(results => {
$w('#repeater3').data = results.items;
$w('#repeater3').forEachItem(($w, itemData, index) => {
$w("#date1").text = itemData.dateone;
$w("#duration1").text = itemData.duration;
$w("#price1").text = itemData.individaulPrice;
});
});
I’m also expecting to have some trouble getting the button to setItem with the corresponding data in the relevant fields due to being in a repeater. The price and duration will stay the same but the date will be different in each row, any help on this would be much appreciated.