Help: Data Form Template

For more help, visit the WebGUI Community Wiki.

canEdit
Code to enable tabs to work correctly.
canViewEntries
This template variable is true when the current user is allowed to view the list of submitted DataForm entries.
entryId
The ID of the current entry being viewed. This variable is undefined unless the user can edit the Data Form (canEdit it true).
form.start
The beginning of the form.
entryList.url
Following this URL will display a list of all the record entries in this data form.
entryList.label
The default label for the entryList.url variable.
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.
delete.url
The URL to delete the current entry from the DataForm.
delete.label
The default label for the delete.url variable.
javascript.confirmation.deleteOne
Javascript for an internationalized confirmation popup for deleting one entry.
back.url
A url that will take you back to the default page in the form.
back.label
The default label for the back.url variable.
addField.url
The URL that content managers will visit to add a new field to the form.
addField.label
The default label for the addField.url variable.
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.
hasEntries
The number of entries in this DataForm.
deleteAllEntries.url
A URL to allow the user to delete all entries in the DataForm.
deleteAllEntries.label
The default label for the deleteAllEntries.url variable
javascript.confirmation.deleteAll
Javascript for an internationalized confirmation popup for deleting all entries.
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 about 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. 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 any one 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.
field.form
The form element for this field.
field.name
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.
field.label
The text label for this field.
field.isHidden
A conditional indicating whether this field is supposed to be hidden.
field.isDisplayed
A conditional indicating whether this field is supposed to be displayed.
field.isRequired
A conditional indicating whether this field is required.
field.isMailField
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 editing this field.
form.send
A form button with the internationalized word "send" printed on it.
form.save
A form button to submit the form data.
form.end
The end of the form.
useCaptcha
This variable is true when the CAPTCHA should be shown.
form_captcha
The input field and image for the CAPTCHA
templateId
The ID of the template for displaying the form view of the DataForm.
acknowledgement
The acknowledgement to display to the user after they have submitted data.
emailTemplateId
The ID of the template for sending emails of user submitted data from the DataForm.
acknowlegementTemplateId
The ID of the template for displaying the acknowledgement to the user after they have submitted data to the DataForm.
listTemplateId
The ID of the template for displaying the list view of the DataForm.
mailData
mailData will be true if the DataForm was configured to send emails.
mailAttachments
mailAttachments will be true if the DataForm was configured to email files submitted to the DataForm.
defaultView
This will be true if the DataForm was configured to display the List view by default, instead of the Form.
groupToViewEntries
The Group ID of the group set to view the list of all data submitted to the DataForm when it is in Form mode.
displayTitle
A conditional variable for whether or not the title should be displayed.
description
The description of this wobject.
styleTemplateId
The assetId of the template for displaying the Asset.
printableStyleTemplateId
The assetId of the template for displaying the Asset for printing.
assetId
The unique identifier for this Asset, in base64 encoding.
assetIdHex
The unique identifier for this Asset, in hexadecimal format.
title
The title of the Asset
menuTitle
The title of the Asset used in Navigations.
url
The Asset's URL.
isHidden
A boolean that will be true if this Asset is set not be displayed in Navigations.
newWindow
A boolean that will be true if this Asset is set open in a new browser window.
encryptPage
A boolean that will be true if this Asset is set to be served over SSL.
ownerUserId
The ID of the user who owns this Asset.
groupIdView
The ID of the group that is allowed to view this Asset.
groupIdEdit
The ID of the group that is allowed to edit this Asset.
synopsis
A short description of the contents of the Asset.
extraHeadTags
Extra tags that will be added to the header of the page containing the Asset. These will be included by default so you do not need to add them youself, unless you want them to be in there twice.
isPackage
A boolean that will be true if this Asset is set to be a Package.
isPrototype
A boolean that will be true if this Asset is set to be a prototype.
status
With respect to version control, the status of this Asset. Typically these are the English strings "approved", "pending", "committed".
assetSize
How big this asset is in bytes. The sum of all database fields and attachments.
keywords
This will be a string with the keywords for this asset. Individual keywords will be joined with spaces, unless the keyword contains spaces, in which case it will be quoted.
webgui.version
The version of WebGUI on your site.
webgui.status
The release status for this version of WebGUI (stable, beta, gamma, etc.)
session.user.username
The current user's username.
session.user.firstDayOfWeek
From the current user's profile, the day they selected to be the first day of the week.
session.config.extrasurl
From the WebGUI config, the URL for the extras directory.
session.var.adminOn
This variable will be true if the user is in Admin mode.
session.setting.companyName
From the WebGUI settings, the company name.
session.setting.anonymousRegistration
From the WebGUI settings, whether or not anonymous registration has been enabled.
session form variables
Session Form Variables
Any form variables will be available in the template with this syntax:
<tmpl_var session.form.variable>
If there is more than 1 value in a form variable, only the last will be returned.
session scratch variables
Session Scratch Variables
Any scratch variables will be available in the template with this syntax:
<tmpl_var session.scratch.variable>
 
 
Admin Console
Help: Data Form Template
*
Admin Console