New Feed Back / Rating Star Component

So I was thinking one evening although there is plenty of input controls already, there isn’t a classic star rating system. I was then thinking this would be a useful input on a dashboard I have released to company staff to get feedback from the users using the dashboard.

I managed to get the component working, but could not get, get-udelement working with the component :cry:

Thankfully this forum has some super heros and one of them being @AlonGvili who was so helpful and ended up building this for me with UD element support. So a massive thanks to @AlonGvili else this would not been any good as you wouldn’t have been able to retrieve which star the end-user clicked on.

So thought I would use @adam Syntax Highligher component to demonstrate the code behind this example:-

The default number of Stars is 5 but for this example I choose 3 stars. You can set the colours for the stars as well before and after change, but these are the default colours which are shown in the GIF. You must specify the -Editable parameter else you cannot use the component.

I ended up rebuilding this command with the following component builder:-
https://github.com/AlonGvili/UDControlTemplate

Even though I was given the code, not being a react developer this was still a lot to take in, so can only imagine the headaches Adam and Alon have had whilst producing UD for everyone.

I hope other people find this useful for their dashboard projects:-

Always up for suggestions here:-

:smiley:

I now implemented this in my complaints dashboard, so I can get some feedback from the people using the dashboard…

7 Likes

Man I’m loving all these components - Remembered today this existed back from October :slight_smile:

Is there anyway to set the star rating at load? so instead of clicking 2 star I can default the page to load with a 2 star?

Hello @mylabonline to be totally honest on this one @AlonGvili gave me all the information and steps to build this particular component. It is actually using HOOK technology under-the-hood and not to sure how to dynamically set the rating stored in the HOOK state…I’m pretty damn sure v3 of UD has a rating component…