Join the Webstudio community

Updated 6 months ago

Rating system

At a glance

The community member is using an Airtable with a 5-star rating system to rate various product attributes. They want to display this information dynamically on a website, and are wondering if there is a way to color-code the ratings, such as displaying a 5/5 rating in green and a 1/5 rating in red.

Another community member responds that this is possible, suggesting to bind the variable to the rating and use HTML embed to create a JavaScript script to implement the color-coding system. They recommend asking ChatGPT or Claude for help with the script if needed.

The original poster expresses gratitude for the confirmation that this is possible.

In my airtable I'm using the out of 5 rating system, giving each product on the list a rating for a number of different variables , ie durability, affordability, etc.

Now I can bring the information dynamically into the webstudio site, but is there a way to create a color code or something so if it's 5/5 the copy is green, if the variable is 1/5 it displays as red?
M
S
2 comments
Yes it’s possible.

Bind variable to the rating and use html embed to make a script (JS) for this system. Should be easy. Ask to chatGPT or Claude to help you with the script if you need.
Great to know this is possible, thank you.
Add a reply
Sign up and join the conversation on Discord