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 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 represent true/false values with different images
- Create two styles, one for the true state and one for the false state. In the style properties →
tab → Basic Settings → Background Image add or select an image to represent the state. For exampleInsert excerpt _property_tabs _property_tabs name basic nopanel true - Edit the true/false component properties.
- Switch to the
Insert excerpt _property_tabs _property_tabs name design nopanel true - In Style Settings, select a Background Image.
You can also upload an image to use. - In Formatting Rules. In the Formatting Rules section, create a rule for the true state. Setstate. In the formatting rule properties → Basic Settings section, set:
- Rule Expression to
'true'
. - Select a In Style, select the style with an the background image that represents the false true state.
- Rule Expression to
- Save the true formatting rule
- In Formatting Rules section, create a another rule for the false state and set:
- #Rule Rule Expression to
'_form.value'
- Set the stop on true flag
- ormatting rule select a style with a In Style, select the style with the background image that represents the true state and the second formatting rule should select a style with an image that represents the false state.
- #Rule Rule Expression to
...
Stop if TrueInsert excerpt _tick _tick