LABEL property
Evaluating user interface labeling of an input or design component
A “Label” ( <LANGINFO lang="*" label="Product name" .../>) must be defined for all FirstSpirit input and design components in the form template. This language-dependent user interface label is then displayed for each component in the form.
The LABEL attribute is used to define a rule that makes it possible to display or edit a form element, depending on the language-dependent interface label of a form element. In this way, for instance, form elements with a particular label can be purposefully shown or hidden in a particular language.
The expression <PROPERTY source='gadget' name='LABEL'/> can be used in the value determination of the rule definition (or for the definition of a precondition), and returns the language-dependent label of a component.
The LABEL property is based on the language-dependent display of a form element. The individual setting entries made by the editor for the “Preferred display language” (“View” - “Preferred display language” menu) must also be noted. If the rule developer specifies, for instance, that an input component with the language-dependent “Product name” label cannot be edited in the DE language, an editor whose preferred display language is English and who has set the “Always view forms in the preferred display language” option can still edit this component. |
Examples
Example:
Form:
<CMS_INPUT_TEXT name="cs_name" hFill="yes" singleLine="no" useLanguages="yes">
<LANGINFOS>
<LANGINFO lang="*" label="Product name" description="Insert the product name."/>
<LANGINFO lang="DE" label="Produktname" description="Tragen Sie den Produktname ein."/>
</LANGINFOS>
</CMS_INPUT_TEXT>
Rule:
<ON_EVENT>
<WITH>
<NOT>
<OR>
<EQUAL>
<PROPERTY source="cs_name" name="LABEL"/>
<TEXT>Product name</TEXT>
</EQUAL>
<EQUAL>
<PROPERTY source="cs_name" name="LABEL"/>
<TEXT>Produktname</TEXT>
</EQUAL>
</OR>
</NOT>
</WITH>
<DO>
<PROPERTY source="cs_name" name="EDITABLE"/>
</DO>
</ON_EVENT>