From 708e591211b314c0663972f10018ecb70fde6513 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 12 Mar 2005 07:34:36 +0000 Subject: [PATCH] update the DataForm template docs --- lib/WebGUI/i18n/English/DataForm.pm | 224 ++++++++++++++++++++-------- 1 file changed, 163 insertions(+), 61 deletions(-) diff --git a/lib/WebGUI/i18n/English/DataForm.pm b/lib/WebGUI/i18n/English/DataForm.pm index 36cf9e45a..0d3d5e3e6 100644 --- a/lib/WebGUI/i18n/English/DataForm.pm +++ b/lib/WebGUI/i18n/English/DataForm.pm @@ -227,16 +227,15 @@ Enter the default value (if any) for the field. For Yes/No fields, enter "yes" '83' => { message => q|The following template variables are available for Data Form templates.

+* : Only available if the user has already submitted the form.

+! : This variable is required for the Data Form to function correctly.

-acknowledgment
-The acknowledgment specified in the wobject's properties. This message should be displayed after a user submits data. -

-export.tab.url
-Following this URL will export the data stored to this data form as a tab delimited file. +canEdit +A conditional indicating whether the current user has the privileges to edit this Data Form.

-export.tab.label
-The default label for the export.tab.url variable. +form.start !
+The beginning of the form.

entryList.url
@@ -247,8 +246,12 @@ Following this URL will display a list of all the record entries in this data fo The default label for the entryList.url variable.

-canEdit -A conditional indicating whether the current user has the privileges to edit an existing entry or export the form's data. +export.tab.url
+Following this URL will export the data stored to this data form as a tab delimited file. +

+ +export.tab.label
+The default label for the export.tab.url variable.

back.url
@@ -259,42 +262,6 @@ A url that will take you back to the default page in the form. The default label for the back.url variable.

-username*
-The username of the user that submitted the data. -

- -userId*
-The user id of the user that submitted the data. -

- -date*
-The date that this data was submitted or last updated formatted as the user's preferred date/time format. -

- - -epoch*
-The date that this data was submitted or last updated formatted as an epoch date. -

- -ipAddress*
-The IP address of the user that submitted the data. -

- -edit.url*
-The URL to the page to edit this entry. -

- -error_loop*
-A loop containing error information, for instance if someone doesn't fill out a required field. -

- -

- -error.message*
-An error message indicating what the user might have done wrong. - -
- addField.url
The URL that content managers will visit to add a new field to the form.

@@ -303,17 +270,149 @@ The URL that content managers will visit to add a new field to the form. The default label for the addField.url variable.

-form.start
-The beginning of the form. +addTab.url
+The URL that content managers will visit to add a new tab to the form.

+addTab.label
+The default label for the addTab.url variable. +

+ +tab.init!
+Code to enable tabs to work correctly. +

+ +username *
+The username of the user that submitted the data. +

+ +userId *
+The user id of the user that submitted the data. +

+ +date *
+The date that this data was submitted or last updated formatted as the user's preferred date/time format. +

+ +epoch *
+The date that this data was submitted or last updated formatted as an epoch date. +

+ +ipAddress *
+The IP address of the user that submitted the data. +

+ +edit.url *
+The URL to the page to edit this entry. +

+ +error_loop *
+A loop containing error information, for instance if someone doesn't fill out a required field. +

+ +

+ +error.message *
+An error message indicating what the user might have done wrong. + +
+ +tab_loop
+A loop containing information about tabs that may have been defined for this Data Form. +

+ +

+ +tab.start !
+Code to start the tab. +

+ +tab.sequence
+A number indicating which tab this is (first, second, etc.). +

+ +tab.label
+The label for this tab. +

+ +tab.tid
+This tab's ID. +

+ +tab.subtext
+A description of this tab that can explain more the tab contents than the label. +

+ +tab.controls !
+Editing icons for this tab. +

+ +tab.field_loop !
+A loop containing all the fields for this tab. See the field_loop description +below to see which template variables may be used inside this loop. +

+ +

+ +tab.field.form !
+The form element for this field. +

+ +tab.field.name
+The name of this field. +

+ +tab.field.tid
+The ID of the Tab that this field is in. +

+ +tab.field.value
+The value of this field. If this is new data, then the default value will be used. +

+ +tab.field.label
+The text label for this field. +

+ +tab.field.isHidden
+A conditional indicating whether this field is supposed to be hidden. +

+ +tab.field.isDisplayed
+A conditional indicating whether this field is supposed to be displayed. +

+ +tab.field.isRequired
+A conditional indicating whether this field is required. +

+ +tab.field.isMailField
+A conditional indicating whether this field is present only to facilitate sending an email. +

+ +tab.field.subtext
+A description of the field so that users know what to put in the field. +

+ +tab.field.controls
+WebGUI's administrative controls for editing this field. +

+ +

+ +tab.end !
+Code to end the tab. +

+ +

+ field_loop
A loop containing all of the field information.

-field.form
+field.form !
The form element for this field.

@@ -321,6 +420,14 @@ The form element for this field. The name of this field.

+field.tid
+The ID of the Tab that this field is in. +

+ +field.inTab
+A conditional indicating if the field is inside of a tab. +

+ field.value
The value of this field. If this is new data, then the default value will be used.

@@ -337,10 +444,6 @@ A conditional indicating whether this field is supposed to be hidden. A conditional indicating whether this field is supposed to be displayed.

-field.isEditable
-A conditional indicating whether this field is editable. -

- field.isRequired
A conditional indicating whether this field is required.

@@ -349,13 +452,12 @@ A conditional indicating whether this field is required. A conditional indicating whether this field is present only to facilitate sending an email.

- field.subtext
A description of the field so that users know what to put in the field.

field.controls
-WebGUI's administrative controls for this field. +WebGUI's administrative controls for editing this field.

@@ -364,20 +466,20 @@ WebGUI's administrative controls for this field. From outside the field_loop it's also possible to access all form fields directly. To accomplish this you should use these variables. Call them with field.noloop.fieldName.property, where fieldName is the name of the field (not the label) and property is anyone of the properties supplied by the field_loop. If you want the form tag of field 'name' you should use field.noloop.name.form anywhere in your template. If you want to know if the field is required use field.noloop.name.isRequired.

-form.send
-A form button with the word "send" printed on it. +form.send !
+A form button with the internationalized word "send" printed on it.

-form.save
-A form button with the word "save" printed on it. +form.save !
+A form button to submit the form data.

-form.end
+form.end !
The end of the form.

-*Only available if the user has already submitted the form.|, - lastUpdated => 1101772868 +|, + lastUpdated => 1110613373, }, '61' => {