RatingPro
A special field that allows for star ratings using Freeform's built-in CSS. The field.type property value is rating (for conditionals).
This field type is included automatically with the Pro edition of Freeform.
Settings
- Set the field's number of stars (
3-10). - Style the color of the stars for the unselected, hover and selected states.
Styling & Customization
To manually render a Rating field using your own styles, your code might look something like this:
{% for i in 1..field.maxValue %}
<label for="rating-{{ i }}">whatever {{ i }}</label>
<input type="radio" id="rating-{{ i }}" value="{{ i }}" name="{{ field.handle }}">
{% endfor %}
Templating
| Property | Description |
|---|---|
field.colorIdle | The color of unselected rating icons. |
field.colorHover | The color used when hovering over a rating icon. |
field.colorSelected | The color of selected rating icons. |
field.maxValue | The maximum rating value. |