Rating & Scale Fields
Collect ratings and scale-based responses for surveys, reviews and feedback forms.
Overview
Polyform has two rating field types: rating for icon-based ratings (like star ratings) and scale for numeric scale inputs (like Likert scales or NPS). Both are validated by the RatingFieldValidator and support custom ranges and labels.
Rating Field
Use addRating() to add an icon-based rating field. Works well for star ratings, product reviews and quick feedback.
app/Actions/CreateReviewForm.php
Custom Rating Icons
You can change the icon and maximum value for rating fields.
app/Actions/CreateFeedbackForm.php
Rating Settings
Configurable Defaults
Default rating settings can be configured in
config/polyform.php under the rating field type configuration. Scale Field
addScale() creates a numeric scale input, good for Likert scales, NPS (Net Promoter Score) and other scale-based questions.
app/Actions/CreateSurveyForm.php
Simple Scale
For basic agreement scales or numeric ratings without labels.
app/Actions/CreateAssessmentForm.php
Scale Settings
Validation
The RatingFieldValidator checks:
- Value is a valid number
- Value is within the configured min/max range
- Value follows the step increment (for scale fields)
- Required/optional status based on field configuration
Use Cases
Rating fields work best for quick visual feedback (1-5 stars), while scale fields suit research surveys and detailed questionnaires (1-10 NPS, 1-7 Likert scales).