Managing Rating Display using Repeaters

Good day wix community! I am a newcomer to WIX and this community so I am not really sure how this works, nonetheless, I have a coding issue and require some assistance.

I have successful added display ratings to my repeaters and linked these (display ratings) up to their respective data collection fields. I have also been able to add a user dropdown function and was able to copy and paste the wix code to change and update a single display rating within the repeater.

However, I am trying to replicate this rule for each individual item in the repeater but was unsuccessful in that area. Can someone please assist?

Below is the wix code I current use:

export function dropdown1_change(event) {
// get the current item from the dataset
const currentItem = $w(“#dataset1”).getCurrentItem();
// get the current average rating and number of ratings
const average = currentItem.ratingValue;
const count = currentItem.ratingCount;
// get the new rating from the dropdown and make it a number
const newRating = Number($w(‘#dropdown1’).value);
// calculate the new average rating based on the current average and count
const newAverage = ((average * count) + newRating) / (count + 1);
// save new average rating and total ratings to the collection
$w(‘#dataset1’).setFieldValues( {
‘ratingValue’: newAverage,
‘ratingCount’: count + 1
} );
$w(‘#dataset1’).save()
. catch ( (err) => {
console.log(‘could not save new rating’);
} );
// disable the dropdown
$w(‘#dropdown1’).disable();
}

Many thanks and best regards
Dwaine

Hm, you mention many rating displays? Are you sure you’d attached one to an item, so really attached to the repeater?
I am asking because I have an issue with this. I cannot attach the rating display to a repeater item. Tried many different ones, it will attach radio buttons, toggles and fields etc. but not the user ratings and sliders.

hi Blaz, it appears that wix has disable this function. I no longer can attach user rating displays to my repeaters.

However, those I initially attached to the repeaters (say about a month ago) are still functional but I can’t attach any new ones.

o, this could/must be a bug. Do you have this repeater connected to a collection that has another repeater on another page? Maybe this is a reason, I have it so.

I am having a similar issue with a repeater:

“…I initially attached to the repeaters (say about a month ago) are still functional but I can’t attach any new ones.”

Hi, I am encountering the same issue with attaching the ratings to a repeater. Is this a bug or a feature? Thanks,