I modified the hidden widget as follows. Wasn't too sure what to do about the id tag. The "values" attribute should be a list of values.
ad_proc -public template::widget::hidden {
element_reference
tag_attributes
} {
@param element_reference Reference variable to the form element
@param tag_attributes HTML attributes to add to the tag
@return Form HTML for widget
} {
upvar $element_reference element
if { [exists_and_not_null element(values)] } {
set values $element(values)
set output {}
foreach value $values {
set value [ad_quotehtml $value]
append output "<input type=\"hidden\" id=\"$element(name)\" name=\"$element(name)\" value=\"$value\">\n"
}
return $output
} else {
return [input hidden element $tag_attributes]
}
}