Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 24 Sep 2002 09:06:04 -0000 1.7 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 21 Nov 2002 15:09:48 -0000 1.8 @@ -30,6 +30,7 @@ @see template::form::export @see template::form::get_combined_values @see template::form::get_values + @see template::form::get_errors @see template::form::is_request @see template::form::is_submission @see template::form::is_valid @@ -386,6 +387,24 @@ } } + +ad_proc -public template::form::get_errors { id } { + @param id The form identifier + @return the list of form errors +} { + set level [template::adp_level] + + upvar #$level $id:error formerror + + if { [info exists formerror] } { + # errors exist in the form, return them + return [array get formerror] + } else { + # no errors exist in the form, return the empty list + return [list] + } +} + ad_proc -public template::form::get_combined_values { id args } { Return a list which represents the result of getting combined values from multiple form elements