-
Notifications
You must be signed in to change notification settings - Fork 4
Switch
Jeff Olajos edited this page Nov 8, 2024
·
25 revisions
<SWITCH/> : FormField
The <SWITCH/> is a really simple animated switch button that holds a true/false value.
- Do not use a <SWITCH/> where by default the value should be null
- <SWITCH/> can only have a true/false state
| Name | Type | Default | Description | Req |
|---|---|---|---|---|
| value | bool | false | defaults to false if not set in template, true shows an on switch, false shows an off switch | |
| color | The color of the switch when "false". Can be specified as a comma separated list (color, color2, color3) | |||
| color2 | color | The color of the switch when "true". | ||
| color3 | color | The color of the switch track. |
<BOX layout="row" center="true" expand="false">
<SWITCH id="sw" />
<TEXT size="28" value="={sw} ? ':hear_no_evil:' : ':see_no_evil:'" />
</BOX> Bind to the value directly by the id sw or do sw.value to determine the SWITCH's current bool value.

Framework Markup Language is an open source programming language created by AppDaddy Software Solutions Inc. FML and is licensed under a fair source license agreement and is maintained by a community of developers.
- Quick Start
- Widget Structure
- Layout Basics
- Config
- Navigation
- Authentication
- Server Configuration
- Offline Use
- Resource Guides
-
<FML/>
- <BOX/>
- <CHART/>
- <COLUMN/>
- <DRAWER/>
- <FOOTER/>
- <FORM/>
- <GRID/>
- <HEADER/>
- <LIST/>
- <MAP/>
- <WINDOW/>
- <PAGER/>
- <ROW/>
- <SCROLLER/>
- <SPLITVIEW/>
- <STACK/>
- <TABLE/>
- <TABVIEW/>
- <TREEVIEW/>
- <WEBVIEW/>

Important Concepts