Index: openacs-4/packages/dynamic-types/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dynamic-types/tcl/form-procs.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/dynamic-types/tcl/form-procs.tcl 17 Feb 2005 03:12:37 -0000 1.2.2.1 +++ openacs-4/packages/dynamic-types/tcl/form-procs.tcl 17 Feb 2005 15:03:13 -0000 1.2.2.2 @@ -1,3 +1,4 @@ + ad_library { A library of functions to generate forms for acs_objects from stored metadata. @@ -309,11 +310,22 @@ ns_log debug "PROCESSING: $attributes(name)" if {[info exists widgets($attributes(attribute_id))]} { ns_log debug "PROCESSING: found $attributes(name) in form" - # first check for the attribute in the submitted form - set crv_$attributes(name) [template::element::get_values \ + array set this_widget_info $widgets($attributes(attribute_id)) + switch $this_widget_info(widget) { + file {} + checkbox - + multiselect { + set crv_$attributes(name) [template::element::get_values \ + $form \ + ${prefix}$attributes(name)] + } + default { + set crv_$attributes(name) [template::element::get_value \ $form \ ${prefix}$attributes(name)] + } + } } elseif {[info exists default($attributes(name))]} { ns_log debug "PROCESSING: using supplied default for $attributes(name)" @@ -338,7 +350,6 @@ lappend missing_columns $attributes(column_name) } - if {![string equal [set crv_$attributes(name)] ""]} { lappend columns $attributes(column_name) @@ -624,13 +635,13 @@ file {} checkbox - multiselect { - return "-values $value" + return "-values \"$value\"" } date { return "-value {[template::util::date::from_ansi $value]}" } default { - return "-value $value" + return "-value \"$value\"" } } }