string¶
Description¶
The most basic element where a single value may be entered.
Properties¶
- default - the value presented as the default value if no value had previously been entered before. This can be a string or a TCL expression.
- display - gives a hint to the renderer about how this element should be displayed. This can be “small”, “medium”, “large”, “xlarge”, or “xxlarge”
- required - if present, then a valid value must be entered.
- validator - gives the renderer a hint about what type of data is valid.
Syntax¶
string <name> [default "Default value"] [display <display hint>] [required] [validator <validator>]
Examples¶
section example1 {
string ipAddr required validator "IpAddress"
string port default "80" display "small" validator "PortNumber"
}
text {
example1 "IP:Port Parameters"
example1.ipAddr "Please enter a valid ipv4 or ipv6 address: "
example1.port "Please define the service port: "
}