Application Express User's Guide > Controlling Page Layout and... > Customizing Templates > Label Templates
Label Templates |
Previous |
Next |
Label templates are designed to centrally manage HTML markup of page item labels. Each item can have an optional label. You can control how these labels display using label templates. For example, you could create a label template called Required Field that references an image (such as an asterisk) to indicate to the user that the field is required.
Label templates enable you to define a before-and-after text string that gets prepended and appended to the item.
This section describes specific sections of the Label Template page.
Template Name identifies the name of the template. Use the Translatable check box to indicate that the template contains text strings that require translation. Theme indicates the theme to which the template is a member.
Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.
Use Template Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.
To load a new copy of a master template, click Refresh.
In Before Label, enter HTML to display before the item label. Before Label supports the substitution strings #CURRENT_FORM_ELEMENT#
; #CURRENT_FORM_ID#
, and #CURRENT_ITEM_NAME#
. For example:
<label for="#CURRENT_ITEM_NAME#"> <a href="javascript:popupFieldHelp('#CURRENT_ITEM_ID#', '&SESSION.','&CLOSE.')" >
In After Label, enter HTML to display after the item label. Since the label will be automatically display before the HTML in this region, any open HTML tags in the Before Label region should be closed here. For example:
</a></label>
In On Error Before Label, enter HTML to precede the item label when an application displays an inline validation error message for the item. For example:
<font class="fieldtitleleft">#ERROR_MESSAGE#</font>
In On Error After Label enter HTML to be appended to the item label when a application displays an inline validation error message for the item. This attribute supports the substitution strings #CURRENT_FORM_ELEMENT#
, #CURRENT_FORM_ID#
, and #CURRENT_ITEM_NAME#
. The following example would append a space and a closing bracket to the displayed item label with the error.
]</font>