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.2.6 -r1.7.2.7 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 6 Jun 2003 08:58:29 -0000 1.7.2.6 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 2 Jul 2003 19:11:31 -0000 1.7.2.7 @@ -35,6 +35,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 @@ -626,6 +627,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