This page is for application designers who want to create a true/false representation that is different to the default tick box.
By default, a true-false component shows a tick box that isInsert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
This page is for application designers who want to create a true-false representation that is different to the default tick box.
By default, a true-false component shows a tick box that is:
- ticked where a value is true
- unticked where a value is false.
To You can use different images to represent true/false values with different images-false values. For example, the following image shows a slider that changes colour when the value is true.
To use an image other than the default tick box, use styles and formatting rules.
- Create two styles, one for the true state and one for the false state. In the style properties →
Insert excerpt _property_tabs _property_tabs name basic →nopanel true
For each style, in the style Properties tab → Basic Settings → Background Image, add or select an image to represent the state; see Adding Images. - Edit the true/-false component properties.Switch to the to create two formatting rules, one for the true state and one for the false state.
- In the Styles tab → Formatting Rules section, click
Insert excerpt _
add _
name design
.add nopanel true
- In the formatting rule Properties tab → Basic Settings section:
- For the true state, set:
- Rule Expression:
'true'
.
- Rule Expression:
- For the true state, set:
- Style
- : select the style with the background image that represents the true state.
- In the Styles tab → Formatting Rules section, click
- Save the "true" formatting rule.
- For the false state
- , set:
- Rule Expression
- , set:
- :
'_form.value'
- :
_tick _tick - Style:, select the style with the background image that represents the false state.
Insert excerpt - Stop if True: tick
- Save
- each rule.
- Save the component.