Index: openacs-4/packages/acs-templating/tcl/data-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/data-procs.tcl,v diff -u -r1.23.2.15 -r1.23.2.16 --- openacs-4/packages/acs-templating/tcl/data-procs.tcl 26 Jan 2022 14:45:25 -0000 1.23.2.15 +++ openacs-4/packages/acs-templating/tcl/data-procs.tcl 7 Feb 2022 16:12:30 -0000 1.23.2.16 @@ -61,13 +61,19 @@ $value_ref value \ element element - if {[info exists element(widget)] && - $element(widget) in {radio select multiselect} && - [info exists element(options)]} { + if { + [info exists element(widget)] && + $element(widget) in {radio select multiselect} + } { # Make sure widgets that are meant to pick an option from a # restricted list of values, actually allow only those values. + + # These widgets MUST specify a list of options. When none is + # specified, validation will fail. + set options [expr {[info exists element(options)] ? $element(options) : ""}] + set valid_p false - foreach o $element(options) { + foreach o $options { lassign $o option_label option_value if {$value eq $option_value} { set valid_p true