state_widget db { default " " } { select_name "usps_abbrev" }What it does:
Returns a state selection boxDefined in: /web/philip/packages/acs-core/widgets-procs.tcl
Source code:
set widget_value "<select name=\"$select_name\">\n" if { $default == "" } { append widget_value "<option value=\"\" SELECTED>Choose a State</option>\n" } set selection [ns_db select $db "select * from states order by state_name"] while { [ns_db getrow $db $selection] } { set_variables_after_query if { $default == $usps_abbrev } { append widget_value "<option value=\"$usps_abbrev\" SELECTED>$state_name</option>\n" } else { append widget_value "<option value=\"$usps_abbrev\">$state_name</option>\n" } } append widget_value "</select>\n" return $widget_value