Index: openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl,v diff -u -r1.16.2.21 -r1.16.2.22 --- openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 25 Jul 2003 18:50:55 -0000 1.16.2.21 +++ openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 25 Jul 2003 19:14:36 -0000 1.16.2.22 @@ -140,7 +140,9 @@

-extend

Extend an existing form. This allows one to build forms incrementally. Forms are built at the template level. As a consequence one can write utility procs that use -extend to build form - snippets common to several data entry forms. + snippets common to several data entry forms. Note that the full form block must be built up + (extended) and completed before any action blocks such as select_query, new_request, edit_request etc. + are defined.

This must be the first switch passed into ad_form

@@ -172,12 +174,22 @@ include your own. +

-has_submit { 0 | 1 }

+

Set to 1 to suppress the OK button automatically added by the form builder. Use this if you + include your own. +
+ +

-method

+

The standard METHOD attribute to specify in the HTML FORM tag at the beginning of the rendered + form. Defaults to POST. +
+

-form

Declare form elements (described in detail below)

-cancel_url

-

The URL the cancel button should take you to. If this is specified, a cancel button will show up. +
The URL the cancel button should take you to. If this is specified, a cancel button will show up during the edit phase.
@@ -276,6 +288,18 @@ executed. It is useful for putting in stuff like ad_returnredirect that is the same for new and edit. +

-validate

+

A code block that validates the elements in the form. The elements are set as local values. + The block has the following form: +
+{element_name
+    {tcl code that returns 1 or 0}
+    "Message to be shown by that element in case of error"
+}
+{...}
+       
+
+ Two hidden values of interest are available to the caller of ad_form when processing a submit: