ad_generic_optionlist items values { default " " }What it does:
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.Defined in: /web/philip/packages/acs-core/widgets-procs.tcl
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 { [string compare $default $value] == 0 } {
append return_string "<option SELECTED value=\"$value\">[lindex $items $count]\n"
} else {
append return_string "<option value=\"$value\">[lindex $items $count]\n"
}
incr count
}
return $return_string