util_GetCheckboxValues
one of
the documented procedures in this
installation of the ACS
Usage:
util_GetCheckboxValues form checkbox_name { default_return "0" }
What it does:
For getting all the boxes from a set of checkboxes in a form.
This procedure takes the complete ns_conn form and returns a list of
checkbox values. It returns 0 if none are found (or some other
default return value if specified).
Defined in:
/web/photonet/tcl/ad-utilities.tcl.preload
Source code:
set i 0
set size [ns_set size $form]
while {$i<$size} {
if { [ns_set key $form $i] == $checkbox_name} {
set value [ns_set value $form $i]
check_for_form_variable_naughtiness $checkbox_name $value
# LIST_TO_RETURN will be created if it doesn't exist
lappend list_to_return $value
}
incr i
}
#if no list, you can specify a default return
#default default is 0
if { [info exists list_to_return] } { return $list_to_return } else {return $default_return}