Skip to main content
Kinetic Community

Choices

A choice can be created for a list question with the choice function. The choice function takes two string arguments. The first argument is the string value of the choice. The second argument is the string label of the choice. If only one string argument is given, the label will be equal to the value.

Creating Choices

choice "yes"
choice "no"

The two choices above are for a list question with choices yes and no. Because only one argument is given, the label of the choices will be equal to their values.

choice "#ff0000", "red"
choice "#00ff00", "green"
choice "#0000ff", "blue"

The three choices above are for a list question with choices red, green, and blue. Because two arguments are given, the labels will be red, green, and blue while their values will be #ff0000, #00ff00, and #0000ff respectively.