Rating control

A rating control allows users to view or set ratings, that indicates the satisfaction of for instance content or services.

Rating control

Figure 1 - Credit rating

Variations

None.

When to use

Use a rating control to allow ratings on content or services. The rating can be set to have a scale of 1-10, or any defined attribute.

A rating control can be placed on a field, list, card or group.

How to use

Add the rating control to a field, list, card or group:

field <field_name> {
    ...
    rating {
        showlabel = true;
        maxrating = <Attribute or Integer>
        //e.g. - maxrating = 5; | maxrating = MyMaxRatingAttribute;
    ...
    }
}

------ Example code ------
field Rating {
    rating{
        showlabel = true; //Show/Hide Label [5/7]
        maxrating = 5;
    }
}

Limitations

The rating control always uses star icons to display a rating. It also has a max rating of 10 (can display up to 10 stars).

Properties

Below is a list of properties that can be used to customize the control.

maxrating | showlabel | label | size

Example

Below is an example of how a rating control can be used.

Rating control example

Figure 2 - Credit rating using rating client controls

---- Example code - Rating control, credit rating ----
field CreditRating {
    label = "Credit Rating";
    size = Large;
    rating {
        showlabel = true;
        maxrating = 7;
    }
}