You can access the form object in the individual template with THIS:
THIS
Form functions
The e-mailing or LeadPage object provides a range of functions:
getCategoryContent
Returns the objects that are located in a given system folder.
Syntax
THIS/getCategoryContent/<sorting>/<id>
Parameters
sorting = Sorting order, permissible are "byLastModifiedDesc" for sorting by processing date in descending order and "byDescription" for alphabetical sorting by object name
id = ID of the given system folder
Return value
List of objects
Use
<div tal:repeat="object THIS/getCategoryContent/byDescription/1667869" tal:content="object/getDescription"> </div>
<div>name article 1</div> <div>name
article 2</div> <div>name form 1</div>
<div>name SVG-graphic 1</div> <div> name
website 1</div>
See also:
getContainer
Returns the container with the specified ID.
Syntax
THIS/getContainer/<id>
Parameters
id = Object ID of the container searched for
Return value
Use
<button name="action" type="submit" tal:content="THIS/getContainer/23099936/getAttributeByName/SUBMITTEXT"> </button>
<button name="action" type="submit">SEND</button>
See also:
getCurrentUser
Returns the profile object of the identified profile.
Syntax
THIS/getCurrentUser
Return value
Use
<div tal:content="THIS/getCurrentUser/getValues/NAME"> </div>
<div>Sampleman/div>
See also:
getAdditionalCSS
Returns the optional CSS stored in the appearance.
Syntax
THIS/getAdditionalCSS
Return value
Use
<style tal:content="structure THIS/getAdditionalCSS" type="text/css"> </style>
<style type="text/css">body {
background-color: #00FF00;}</style>
See also:
getBaseCSS
Returns the CSS that was generated from the appearance.
Syntax
THIS/getBaseCSS
Return value
Use
<style tal:content="structure THIS/getBaseCSS" type="text/css"> </style>
<style type="text/css">body{padding: 1em;margin: 0;color: black;background-color: whi...
See also:
getBrowser
Returns the browser object with which the current form is displayed.
Syntax
THIS/getBrowser
Return value
Use
<div tal:content="THIS/getBrowser/getName"> </div>
<div>chrome/div>
See also:
getFormLanguage
Returns the ID of the language of the current form.
Syntax
THIS/getFormLanguage
Return value
Use
<div tal:content="THIS/getFormLanguage"> </div>
<div>1/div>
See also:
getLanguage
Returns the optional language of the object.
Syntax
THIS/getLanguage
Return value
ISO country code
Use
<div tal:content="THIS/getLanguage"> </div>
<div>en>/div>
See also:
getOrderedAttributes
Returns a sorted, multi-column list of the fields of the current form, according to the field configuration.
Syntax
THIS/getOrderedAttributes
Return value
multi-column list of attributes
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
content="attribute/getLabel" tal:repeat="attribute row"> </td> </tr> </tbody> </table>
<table> <tbody>
<tr> <td> salutation</td> <td> first name</td>
<td> name</td>
</tr> <tr> <td> street</td> <td>
House number</td> </tr>
<tr> <td>PLZ</td> <td>Place</td> </tr>
<tr> <td> Country</td> </tr>
</tbody> </table>
See also:
hasResourceImageUrl
Indicates whether an image is stored for the current form.
Syntax
THIS/hasResourceImageUrl
Return value
Boolean
Use
<div>image available/div>
<div>no image available/div>
See also:
getResourceImageUrl
Returns the URL to the image stored in the current form.
Syntax
THIS/getResourceImageUrl
Return value
Use
<img src="#" tal:attributes="src THIS/getResourceImageUrl" alt=""/>
<img src="/art_resource.php?sid=dsokp.2ag693n" alt="">
See also:
hasShortText
Indicates whether a short text has been set for the current form.
Syntax
THIS/hasShortText
Return value
Boolean
Use
<div>short text set/div>
<div>short text not set</div>
See also:
getShortText
Returns the short text of the current form.
Syntax
THIS/getShortText
Return value
Use
<div tal:content="structure THIS/getShortText"> </div>
<div>This is the short text for form 1.</div>
See also:
getSubmitLabel
Returns the label of the send button from the appearance.
Syntax
THIS/getSubmitLabel
Return value
Use
<div tal:content="THIS/getSubmitLabel"> </div>
<div>send off
See also:
getTitle
Returns the form title.
Syntax
THIS/getTitle
Return value
Use
<div tal:content="THIS/getTitle"> </div>
<div>title form 1</div>
See also:
isSubmit
Specifies whether the form is displayed after it has been submitted.
Syntax
THIS/isSubmit
Return value
Boolean
Use
<div>Form has been sent
<div>form has not been sent
See also:
renderCaptcha
Returns the source code for a captcha, if enabled in the current form.
Syntax
THIS/renderCaptcha
Return value
Use
<div tal:content="structure THIS/renderCaptcha"> </div>
<div><script type="text/javascript" async="" src="https://...
See also:
isAutomatedEntryProtectionEnabled
Indicates whether protection against foreign entries has been activated.
Syntax
THIS/isAutomatedEntryProtectionEnabled
Return value
Boolean
Use
<div>Protection against unauthorized entry active</div>
<div>Protection against unauthorized entry not active</div>
See also:
getCsrfToken
Returns the CSRF token for protection against automatic entries.
Syntax
THIS/getCsrfToken
Return value
Use
<input type="hidden" tal:attributes="value THIS/getCsrfToken; name THIS/getCsrfTokenName;" name="name" value="value"/>
<input type="hidden"
See also:
getCsrfTokenName
Returns the name of the CSRF token for protection against automatic entries.
Syntax
THIS/getCsrfTokenName
Return value
Use
<input type="hidden" tal:attributes="value THIS/getCsrfToken; name THIS/getCsrfTokenName;" name="name" value="value"/>
<input type="hidden"
See also:
hasAutomatedEntryProtectionError
Indicates whether an error was triggered by the protection against foreign entries. This is exactly the case if the check of the CSRF tokens failed.
Syntax
THIS/hasAutomatedEntryProtectionError
Return value
Boolean
Use
<div>Error due to external entry</div>
<div>no error due to external entry</div>
See also:
isMultipleSubmitProtectionEnabled
Indicates whether the protection against multiple entries has been activated.
Syntax
THIS/isMultipleSubmitProtectionEnabled
Return value
Boolean
Use
<div> multiple entries excluded/div>
<div> multiple entries allowed</div>
See also:
isSubscriptionLimitSet
Indicates whether the number of entries for the current form is limited (entry limitation).
Syntax
THIS/isSubscriptionLimitSet
Return value
Boolean
Use
<div>entries limited/div>
<div>entries unlimited/div>
See also:
isSubscriptionLimitRedirectActive
Indicates whether the entry limitation has been activated and already reached for the current form.
Syntax
THIS/isSubscriptionLimitRedirectActive
Return value
Boolean
Use
<div>limit reached/div>
<div>limit not yet reached div>
See also:
getSubscriptionLimitCount
Returns, if available, the limit for the number of entries for the current form.
Syntax
THIS/getSubscriptionLimitCount
Return value
Use
<div tal:content="THIS/getSubscriptionLimitCount"> </div>
<div>10/div>
See also:
getSuccessfulSubscriptions
Returns the number of entries about the current form.
Syntax
THIS/getSuccessfulSubscriptions
Return value
Use
<div tal:content="THIS/getSuccessfulSubscriptions"> </div>
<div>3/div>
See also:
getSubscriptionLimitLeft
Returns the number of entries until the entry limit of the current form is reached.
Syntax
THIS/getSubscriptionLimitLeft
Return value
Use
<div tal:content="THIS/getSubscriptionLimitLeft"> </div>
<div>7/div>
See also:
getSubscriptionLimitRedirectUrl
Returns the forwarding destination of the current form in case the entry limit has been reached.
Syntax
THIS/getSubscriptionLimitRedirectUrl
Return value
Use
<div tal:content="THIS/getSubscriptionLimitRedirectUrl"> </div>
<div>https://www.example.com</div>
See also:
isSubscriptionLimitStartTimeSet
Specifies whether a start-time limit, from which the form is displayed, is set.
Syntax
THIS/isSubscriptionLimitStartTimeSet
Return value
Boolean
Use
<div>start-time-limitation active</div>
<div>start-time-limitation inactive div>/div>
See also:
isSubscriptionLimitStartTimeRedirectActive
Specifies whether a start-time limit is active, after which the form is displayed, is set and has not yet been reached.
Syntax
THIS/isSubscriptionLimitStartTimeRedirectActive
Return value
Boolean
Use
<div>Entries not yet started</div>
<div>Entries started</div>
See also:
getSubscriptionLimitStartTime
Returns the time from which the form is displayed (start-time limit).
Syntax
THIS/getSubscriptionLimitStartTime
Return value
Note
Since the system works globally and thus in all time zones, all time data are, unless otherwise specified, in the Coordinated Universal Time / UTC(see Wikipedia)
Use
<div tal:content="THIS/getSubscriptionLimitStartTime"> </div>
<div>1569935940</div>
See also:
getTimeIntervalSinceSubscriptionLimitStarts
Returns the time since when the start-time limit for the current form has been exceeded.
Syntax
THIS/getTimeIntervalSinceSubscriptionLimitStarts
Return value
Use
<div tal:content="THIS/getTimeIntervalSinceSubscriptionLimitStarts"> </div>
<div>13 days, 23 hours, 29 minutes
See also:
getTimeIntervalUntilSubscriptionLimitStarts
Returns the time until when the start-time limit ends.
Syntax
THIS/getTimeIntervalUntilSubscriptionLimitStarts
Return value
Use
<div tal:content="THIS/getTimeIntervalUntilSubscriptionLimitStarts"> </div>
<div>13 days, 23 hours, 29 minutes
See also:
getSubscriptionLimitStartTimeRedirectUrl
Returns the forwarding destination of the current form in case the start-time limit has not yet been reached.
Syntax
THIS/getSubscriptionLimitStartTimeRedirectUrl
Return value
Use
<div tal:content="THIS/getSubscriptionLimitStartTimeRedirectUrl"> </div>
<div>https://www.example.com</div>
See also:
isSubscriptionLimitEndTimeSet
Specifies whether an end-time limit up to which the form is displayed is set.
Syntax
THIS/isSubscriptionLimitEndTimeSet
Return value
Boolean
Use
<div>Entries limited in time</div>
<div>entries without time limit
See also:
isSubscriptionLimitEndTimeRedirectActive
Specifies whether an end-time limit up to which the form is displayed is set and has already been exceeded.
Syntax
THIS/isSubscriptionLimitEndTimeRedirectActive
Return value
Boolean
Use
<div>entries expired
<div>entries still open
See also:
getSubscriptionLimitEndTime
Returns the time until which the form is displayed (end time limit).
Syntax
THIS/getSubscriptionLimitEndTime
Return value
Note
Since the system works globally and thus in all time zones, all time data are, unless otherwise specified, in the Coordinated Universal Time / UTC(see Wikipedia)
Use
<div tal:content="THIS/getSubscriptionLimitEndTime"> </div>
<div>1572527940</div>
See also:
getTimeIntervalSinceSubscriptionLimitEnds
Returns the remaining time until the end time limit takes effect.
Syntax
THIS/getTimeIntervalSinceSubscriptionLimitEnds
Return value
Use
<div tal:content="THIS/getTimeIntervalSinceSubscriptionLimitEnds"> </div>
<div>13 days, 23 hours, 29 minutes
See also:
getTimeIntervalUntilSubscriptionLimitEnds
Returns the time since the end time limit for the current form was exceeded.
Syntax
THIS/getTimeIntervalUntilSubscriptionLimitEnds
Return value
Use
<div tal:content="THIS/getTimeIntervalUntilSubscriptionLimitEnds"> </div>
<div>13 days, 23 hours, 29 minutes
See also:
getSubscriptionLimitEndTimeRedirectUrl
Returns the forwarding destination of the current form, in case the end-time limit has been reached.
Syntax
THIS/getSubscriptionLimitEndTimeRedirectUrl
Return value
Use
<div tal:content="THIS/getSubscriptionLimitEndTimeRedirectUrl"> </div>
<div>https://www.example.com</div>
See also:
isShowValidationErrorsAsList
Specifies whether the form errors should be displayed as a list.
Syntax
THIS/isShowValidationErrorsAsList
Return value
Boolean
Use
<div>display error as list</div>
<div>Do not display errors as a list</div>
See also:
getValidationErrorPrefixText
Returns the introductory error handling text for the current form.
Syntax
THIS/getValidationErrorPrefixText
Return value
Use
<div tal:content="THIS/getValidationErrorPrefixText"> </div>
<div>Please correct the following errors
See also:
renderErrorListHTML
Returns the source code for the error messages of the current form.
Syntax
THIS/renderErrorListHTML
Return value
Use
<div tal:content="structure THIS/renderErrorListHTML"> </div>
<div> <ul>
<li>No
valid e-mail address</li> <li>Validation (Captcha
)</li> </ul> </div>
See also:
hasErrors
Indicates whether errors occurred during the check of the form input.
Syntax
THIS/hasErrors
Return value
Boolean
Use
<div>Errors have occurred!</div>
<div>All information correct/div>
See also:
hasValidationErrors
Indicates whether there were errors during the validation of the form input.
Syntax
THIS/hasValidationErrors
Return value
Boolean
Use
<div> Validation errors have occurred.</div>
<div>No validation errors have occurred.</div>
See also:
getValidationErrorAttributes
Returns all attributes of the current form that had validation errors.
Syntax
THIS/getValidationErrorAttributes
Return value
List of attributes
Use
<div tal:repeat="attribute THIS/getValidationErrorAttributes" tal:content="attribute/getLabel"> </div>
<div>postcode/div> div> div> email/div>
See also:
hasCaptchaError
Indicates whether the captcha was successfully confirmed.
Syntax
THIS/hasCaptchaError
Return value
Boolean
Use
<div>captcha failed div>
<div>Captcha successful/div>
See also:
hasMandatoryErrors
Indicates whether all mandatory fields have been filled in.
Syntax
THIS/hasMandatoryErrors
Return value
Boolean
Use
<div>obligatory information missing div>/div>
<div>All mandatory fields filled out
See also:
getMandatoryErrorAttributes
Returns all attributes of the current form, but the mandatory fields are not filled in.
Syntax
THIS/getMandatoryErrorAttributes
Return value
List of attributes
Use
<div tal:repeat="attribute THIS/getMandatoryErrorAttributes" tal:content="attribute/getLabel"> </div>
<first name, first division, last name, last division.
See also:
hasIdentityErrors
Indicates whether there were errors in the identification of the profile. Identification only takes place on login forms.
Syntax
THIS/hasIdentityErrors
Return value
Boolean
Use
<div> profile not found/div>
<div>identification successful/div>
See also:
isShowIdentityErrorText
Specifies whether an error message for identification errors should be displayed for the current form.
Syntax
THIS/isShowIdentityErrorText
Return value
Boolean
Use
<div>Show error text</div>
<div>Do not display error text</div>
See also:
getIdentityErrorText
Returns the error hint for identification errors of the current form.
Syntax
THIS/getIdentityErrorText
Return value
Use
<div tal:content="THIS/getIdentityErrorText"> </div>
<div>Login failed</div>
See also:
hasDuplicationErrors
Indicates whether a duplicate error occurred in the current form.
Syntax
THIS/hasIdentityErrors
Return value
Boolean
Use
<div> already entered div>
<No duplicate found
See also:
isShowDuplicationErrorText
Specifies whether an error note for duplicate errors should be displayed for the current form.
Syntax
THIS/isShowDuplicationErrorText
Return value
Boolean
Use
<div>Show error text</div>
<div>Do not display error text</div>
See also:
getDuplicationErrorText
Returns the error hint for duplicate errors of the current form.
Syntax
THIS/getDuplicationErrorText
Return value
Use
<div tal:content="THIS/getDuplicationErrorText"> </div>
<div>you are already registered
See also:
Form fields (attributes)
The form fields or attributes support a number of functions:
getLabel
Returns the field label for the current attribute.
Syntax
<attributes>/getLabel
Return value
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
content="attribute/getLabel" tal:repeat="attribute row"> </td> </tr> </tbody> </table>
<table> <tbody>
<tr> <td> salutation</td> <td> first name</td>
<td> name</td>
</tr> <tr> <td> street</td> <td>
House number</td> </tr>
<tr> <td>PLZ</td> <td>Place</td> </tr>
<tr> <td> Country</td> </tr>
</tbody> </table>
See also:
renderLabelHTML
Returns the source code for the form label of the current attribute.
Syntax
<attributes>/renderLabelHTML
Return value
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
content="structure attribute/renderLabelHTML" tal:repeat="attribute row"> </td> </tr> </tbody> </table>
<table> <tbody>
<tr> <td> <label
class="attributesalutation typesalutation" for="form_SALUTATION">saying address</label> </td> <td> <label class="attributefirstname typeinput" for="form_FIRSTNAME">firstname</label></td><td><label class="attributefirstname typeinput" for="form_NAME">name</label></td> </tr> <
tr> <td><label
class="attributeaddress typeinput" for="form_ADDRESS">street</label></td><td><label class="attributestreetnumber typeinput" for="form_STREETNUMBER">house number</label></td> </tr> <tr>
<td><label
class="
attributezipcode typezipcode" for="form_ZIPCODE">PLZ</label></td><td><label class="attributecity typeinput" for="form_CITY">Location</label></td> </tr> <tr>
<td><
label class="attributecountry typecountry" for="form_COUNTRY">Country</label></td> </tr> </tbody>
</table>
See also:
renderWidgetHTML
Returns the source code for the input field of the current attribute.
Syntax
<attributes>/renderWidgetHTML
Return value
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
content="structure attribute/renderWidgetHTML" tal:repeat="attribute row"> </td> </tr> </tbody> </table>
<table> <tbody>
<tr> <td><input
type="text" name="form_FIRSTNAME" id="form_FIRSTNAME" class="attributefirstname typeinput" value=""></td><td><input type="text" name="form_NAME" id="form_NAME" class="attributename typeinput" value=""></td> </tr>
<tr> <td><input
type=
"text" name="form_ADDRESS" id="form_ADDRESS" class="attributeaddress typeinput" value=""></td><td><input type="text" name="form_STREETNUMBER" id="form_STREETNUMBER" class="attributestreetnumber typeinput" value=""></td> </tr> <tr>
<td><
input type="text" name="form_ZIPCODE" id="form_ZIPCODE" class="attributezipcode typezipcode" value=""></td><td><input type="text" name="form_CITY" id="form_CITY" class="attributecity typeinput" value=""></td> </tr>
</tbody> </table>
See also:
hasError
Indicates whether an error occurred with the current attribute during the input check.
Syntax
<attributes>/hasError
Return value
Boolean
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
condition="attribute/hasError" tal:repeat="attribute row">An error has occurred</td> <td
tal:condition="not:attribute/hasError" tal:repeat="attribute row">No error occurred.</td> </tr> </tbody>
</table>
<table> <tbody>
<tr> <td>
An error has
occurred.</td> <td> An error has occurred.</td> <td> No error has occurred.</td> </tr> <tr> <td> No error has
occurred.
</td> <td> No error has occurred.</td> </tr> <tr> <td>
An error has
occurred.</td> <td> An error has occurred.</td> </tr> </tbody> </table>
See also:
hasValidationError
Indicates whether a validation error occurred for the current attribute during input validation.
Syntax
<attributes>/hasValidationError
Return value
Boolean
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
condition="attribute/hasValidationError" tal:repeat="attribute row">A validation error has occurred</td> <td
tal:condition="not:attribute/hasValidationError" tal:repeat="attribute row">No validation error occurred.</td> </tr> </tbody>
</table>
<table> <tbody>
<tr>
<td>A validation error has
occurred.</td><td>A validation error has occurred.</td><td>No validation error has occurred.</td> </tr> <tr> <td>No validation error has
occurred.
</td><td>No validation error has occurred.</td> </tr> <tr>
<td>A validation error has
occurred.</td><td>A validation error has occurred.</td> </tr> </tbody> </table>
See also:
isMandatory
Specifies whether the current attribute is a mandatory field.
Syntax
<attributes>/isMandatory
Return value
Boolean
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
condition="attribute/isMandatory" tal:repeat="attribute row">mandatory field</td> <td tal:
condition="not:attribute/isMandatory" tal:repeat="attribute row">no mandatory field</td> </tr>
</tbody> </table>
<table> <tbody>
<tr> <td>compulsory field</td> <td>compulsory field</td> <td> no
compulsory field</td> </tr> <tr> <td>
no mandatory field</td><td> no mandatory field</td> </tr> <tr> <td> mandatory field</td> <td> mandatory field</td>
</tr> </tbody> </table>
See also:
hasMandatoryError
Indicates whether the current attribute is a mandatory field and has not been filled in before submitting.
Syntax
<attributes>/hasMandatoryError
Return value
Boolean
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
condition="attribute/hasMandatoryError" tal:repeat="attribute row">missing entry</td> <td tal:
condition="not:attribute/hasMandatoryError" tal:repeat="attribute row">no missing specification</td> </tr>
</tbody> </table>
<table> <tbody>
<tr> <td> missing
specification </td> <td> missing specification </td> <td> no missing specification </td> </tr> <tr>
no missing information >/td> >td> no missing information >/td> </tr> <tr> <td> missing
information >/td> >td> mandatory field >/td>
</tr> </tbody> </table>
See also:
getValidationErrorText
Returns the error text for the current attribute.
Syntax
<attributes>/getValidationErrorText
Return value
Use
<table> <tbody>
<tr tal:
repeat="row THIS/getOrderedAttributes"> <td tal:
content="attribute/getValidationErrorText" tal:repeat="attribute row"> </td> </tr> </tbody> </table>
<table> <tbody>
<tr> <td>Please
select salutation</td> <td>no valid first name</td> <td>no valid name</td> </tr> <tr> <td> no valid street</td> <td>
no valid house number >/td> </tr>
<tr> <td> no
valid postcode >/td> <td> no valid city >/td> </tr> <tr> <td> Please
select country
>/td> </tr>
</tbody>
</table>