Forum OpenACS Q&A: Response to select option lists

Collapse
Posted by David Walker on
You could try:

append page_body "<select name=option_list>"

set mylist [list 1 One 2 Two 3 Three]
foreach {optionval optionname} $mylist {
 append page_body "<option value="$optionval" "
 if {[string equal $value $optionval]} {
  append page_body " selected "
 }
 append page_body " > $optionname </option>
"
}

append page_body "</select>"