choice

Description

A list of options where one item may be selected

Syntax

choice <name> [default "Default value"] [display <display hint>] { <choices> }

Properties

  • choices - required the available items that can be selected. This can be a list of strings or a TCL expression
  • default - the value presented as the default value if no value had previously been selected before. This can be a string or a TCL *expression. If no default is selected, the first item in the list will be the default.
  • display - gives a hint to the renderer about how this element should be displayed. This can be “small”, “medium”, “large”, “xlarge”, or “xxlarge”

Examples

section example3 {
  choice yesno default "no" {"yes", "no"}
  choice lbmethod {"Round Robin"=> "round-robin", "Least Connections" => "least-connections" }
}
text {
  example3 "Load Balancing Method"
  example3.yesno "Do you want to change the default LB method? "
  example3.lbmethod "Select the LB method: "
}

Resulting UI presentation:

Codeshare Entries

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.