Skip to main content

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

PropertyDescription
field.colorIdleThe color of unselected rating icons.
field.colorHoverThe color used when hovering over a rating icon.
field.colorSelectedThe color of selected rating icons.
field.maxValueThe maximum rating value.

​Resources