Index: openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp 23 Jun 2015 14:23:08 -0000 1.3
+++ openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp 7 Aug 2017 23:48:03 -0000 1.4
@@ -1,13 +1,18 @@
- The formtemplate tag is used to embed a dynamic form in
-a template. The elements of the form must be created in the Tcl
-script associated with the template. The formtemplate tag is used to embed a dynamic form
+in a template. The elements of the form must be created in the Tcl
+script associated with the template. The formtemplate tag takes the place of the
-form tag in a static HTML form. Explicit form tags in the
-template should not be used to enclose dynamic forms. If the body of the formtemplate is empty, the
+
+ The formtemplate tag takes the place of the
+form tag in a static HTML form. Explicit form tags in
+the template should not be used to enclose dynamic
+forms. If the body of the formtemplate is empty, the
templating system will generate a form automatically based on the
list of elements created in the Tcl script associated with the
template: The style attribute is optional. It may be used to
-select a style template from /ats/templates/forms for
+ The style attribute is optional. It may be used to
+select a style template from /ats/templates/forms for
determining the layout of the auto-generated form. The default
style is defined in the DefaultFormStyle parameter on the
-acs-templating package, and is by default set to standard,
-which is included in the distribution.Formtemplate
Templating System : Designer Guide : Tag Reference : Formtemplate
-Summary
Usage
+
Formtemplate
+Templating System
+ : Designer Guide
+ : Tag Reference
+ : Formtemplate
+Summary
+Usage
+
<formtemplate id="add_user">
<table>
<tr>
@@ -19,31 +24,36 @@
</table><br>
<input type="submit" value="Submit">
</formtemplate>
-
Notes
-
Notes
+
+
<formtemplate id="add_user" style="standard"></formtemplate>
-
HTML attributes, including JavaScript event handlers, may be -specified as attributes to the formtemplate tag. The -system will include all such attributes in the form tag of -the rendered HTML form.
-<formtemplate id="add_user" onSubmit="validate();"> +HTML attributes may be specified as attributes to the +formtemplate tag. The system will include all such +attributes in the form tag of the rendered HTML form. +Although possible, newer browser security features such as CSP +discourage the use of inline Javascript event handlers.
+<formtemplate id="add_user" style="background-color:white;">This will work for both autogenerated and explicitly formatted forms.
-
See the formwidget and -formgroup tags for more +
See the formwidget and +formgroup tags for more information on writing the body of a dynamic form template.