Stacks API

Come build with us.
Stacks API v6 for Stacks 2.5


  <   Custom Controls Reference


Checkbox — checkbox

This content is open source. You can edit it and submit a pull request on GitHub.
This page is generated from this file.


© . YourHead Software all rights reserved.

Checkbox — checkbox

Overview

A checkbox for enabling or selecting from two options.

Although a checkbox would seem to return a boolean value, for historical reasons a checkbox control is able to return any value type. This means, by using the True Value and False Value properties a checkbox can return the string "Jedi" if checked and the value "Sith" when unchecked, or integers, floats, or booleans.

Available: Stacks API v1

True Value

When the checkbox is checked this value will be used in replacement templates.


False Value

When the checkbox is unchecked this value will be used in replacement templates.


Default Value

When this stack is placed on a page the default value will be used. The default value should be either the true or false values.


Clear Value

When all the content is cleared out of a text input area (the user deletes all the text), the control will automatically fill with this value. This is useful for applications where a non-empty string is required.


ID

The ID for this control. This ID must be unique within this stack. The ID is used to refer to control's property. IDs should be alpha-numeric (dashes and underscores are allowed), but should not contain special characters.




Title

The title displayed next to the control. Long titles will be trancated, so keep it short.




Enable

Hide or show the control based on the value of another property.

Enables allow a stack to show only the controls needed by the user to achieve a specific task.

The enable dictionary defines the ID of another control and the value that other control must equal. When the other control's value is not equal to the provided value, this control is hidden.

Enable Dictionary

Warning: creating infinite loops in enable dependencies has undefined behavior but will likely result in a crash.




Tool Tip

The tooltip value is used to display hints for the user on the use of each control. If the function of the control is obvious, then a tooltip should be avoided. Simply re-displaying redundant information like the title has no value to the user.




© . YourHead Software all rights reserved.