ad_generic_optionlist (public)
ad_generic_optionlist items values [ default ]
Defined in packages/acs-tcl/tcl/widgets-procs.tcl
Use this to build select form fragments. Given a list of items and a list of values, will return the option tags with default highlighted as appropriate.
- Parameters:
- items (required)
- values (required)
- default (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_generic_optionlist
Source code: # items is a list of the items you would like the user to select from # values is a list of corresponding option values # default is the value of the item to be selected set count 0 set return_string "" foreach value $values { if { $default eq $value } { append return_string "<option selected=\"selected\" value=\"$value\">[lindex $items $count]</option>\n" } else { append return_string "<option value=\"$value\">[lindex $items $count]</option>\n" } incr count } return $return_stringXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/widgets-procs.xql