Rating widget

The rating widget enables you to display user-assigned star ratings.

Properties

Property

Description

Data type

id

Unique identifier of this widget.

string

label

Optional label text displayed for check box control.

string

ratingScale

Class name or icon name displayed as rating scale.

string

selectedRating

Default selected rating.

string

type Rich-media type, which is always Rating. string

values

Array of text that is the actual value of rating scale.

string

Widget-specific expression evaluations

Property

Description

Data type

ratingText

Example: #widget1.rating1.ratingText

string

selectedRating

Example: #widget1.rating1.selectedRating

integer

Code sample


var obj = {
    "widgetType": "form",
    "nodes":
    [{
            "id": "widget1",
            "controls": {
                "0": {
                    "type": "Rating",
                    "selectedRating": 1,
                    "ratingScale": ["star", "star", "star", "star"],
                    "id": "rating1",
                    "label": "Please select your rating"
                }
            }
        }
    ]
}

.star: after {
    content: '\2605';
}

.star.selected {
    color: gold;
}