For the complete documentation index, see llms.txt. This page is also available as Markdown.

Checkbox

The UI component Checkbox allows the user to easily input data of type boolean. You can bind this UI component to a property, which can allow you to persist this user input to the database. They serve a similar function to the Switch component.

Showroom: Checkbox example, with its setup in Appfarm Create (register for access).

Settings

Here are some of the properties in Appfarm Create which are custom for the Checkbox:

Read Only and Disabled

When Read-only is true, the checkbox shows its value but the user cannot change it. When Disabled is true, the checkbox is shown as disabled.

Value

The data source property or variable that the user input is bound to. This must be of data type boolean. This can be an App Variable, a Runtime Only Object Class property, or a Database Connected Object Class property.

Label

This text gives further information about what the Checkbox means when it is either ticked or left unticked. This can be static text or bound to a data source, while a JavaScript can also be used to display more helpful and intuitive output to the user.

Auto focus

When selected, this component will gain focus automatically when the screen is rendered.

Tab index

Users can use the Tab key to navigate between inputs and components on a screen. This property tells Appfarm Create which index to bind to the current Checkbox. This value should only be given when you want to override the default tab index. Using a tab index of -1 will remove the component from the tab index.

Appearance

Color

The color of the component can be configured to Primary (default), Secondary, Error, Info, Success, Warning or Default. These refer to the colors of the chosen app theme, while Default does not change the color of the checkbox.

Margin

Three choices are available for this property. These define the margin style between this component and other UI components on the screen.

  • Normal

  • Dense

  • None

Remove padding

Shown when Margin is None. Removes all padding around the checkbox. Use it in desktop apps only.

Size

Checkboxes can be of size Small or Medium. An example of the difference between small and medium sizes is available in the Showroom.

Label placement

Shown when a Label is set. Labels can be configured to appear at the Start, End (default), Top or Bottom of the Checkbox component.

Event handlers

Event Handlers can detect a specific event occurring in Appfarm Create and can link these events to actions. One Event Handler is available for the Checkbox component:

On value changed: This Event Handler will run an action when a change is detected in the data source bound to the component. For example, if the data input changes from false to true, or vice versa, a specific action can be performed.

Last updated

Was this helpful?