Start page
Start page

Start page / Template development / Rules / Form properties <PROPERTY/>

<Property/> tag - Defining properties for a form element

The <PROPERTY/> tag can be used in all areas of a rule definition. Depending what context it is used in, it serves to either determine a value or a different property of a form (element), for example:

  • “Get the value of input component A.”
  • “Does input component A have the focus?”
  • “Was the form opened in the Page Store?”

It is also used to carry out an action for a specific form (element), for example:

  • “Check whether the determined value matches the default value.”
  • “Write the determined value in input component B.”
  • “Display input component B in the form.”

Two attributes have to be specified in a <PROPERTY/> tag. A form element is specified using the “source” attribute; a property is specified using the “name” attribute.

Example: “Visibility of the input component st_text in the form”:

<PROPERTY source='st_text' name='VISIBLE'/>

Source attribute

A single component or the entire form can be referenced using the “source” attribute.

The following specifications are possible:

  • Access to an input component <PROPERTY source='name' .../>
    The name of an input component is specified.
    This input enables access to certain properties of input components, such as the value saved in the input component.
  • Access to a design component <PROPERTY source='#form.name'.../>
    The system object #form and the name of the design component are specified in dot notation.
    This information enables access to a design component. This is a form element does not take on any value, instead it is used to group form elements (CMS_GROUP) or to display notice text (CMS_LABEL).
  • Access to a form's general information <PROPERTY source='#global'.../>
    The system object #globalis specified.
    This information enables access to the form's general information, such as the store type or the language setting in which the form is called.

Name attribute

The name of a property is passed using the “name” attribute. The following table specifies which property can be used in which context:

 

Precondition
<IF/>

Value determination
<WITH/>

Handling
instruction
<DO/>

Validation
<VALIDATION/>

Input component
<PROPERTY source='name'.../>

ENTRY

DEFAULT
EMPTY
FOCUS
LABEL
LENGTH
SIZE
VALUE

EDITABLE
VALUE
VISIBLE

VALID

Design component
<PROPERTY source='#form.name'.../>

  

VISIBLE

 

General form information
<PROPERTY source='#global'.../>

INCLUDED
LANG
STORETYPE
TRANSLATED

INCLUDED
LANG
STORETYPE
TRANSLATED

  
     

The following properties are possible:

  • <PROPERTY ... name='BODY/>:
    Returns the content area in which the form has been opened (only for section templates).
  • <PROPERTY ... name='EDITABLE'/>:
    Defines editability (only for input components).
  • <PROPERTY ... name='ELEMENTTYPE'/>:
    Returns the node type (only input components).
  • <PROPERTY ... name='EMPTY'/>:
    Returns a Boolean value. The input components does (true) or does not (false) contain a empty value.
  • <PROPERTY ... name='ENTRY'/>:
    Returns the textual version of a selected value from a selection list.
  • <PROPERTY ... name='FOCUS'/>:
    Returns a Boolean value. The input component does (true) or does not (false) have the focus.
  • <PROPERTY ... name='LANG'/>:
    Returns the project language in which the form is being edited.
  • <PROPERTY ... name='LENGTH'/>:
    Returns the length of an entry in an input component.
  • <PROPERTY ... name='MASTER'/>:
    Returns the master language of the project.
  • <PROPERTY ... name='SIZE'/>:
    Returns the number of elements from an FS_LIST input component.
  • <PROPERTY ... name='STORETYPE'/>:
    Returns the store type in which the form is opened.
  • <PROPERTY ... name='VALID/>:
    Defines validity (only input components).
  • <PROPERTY ... name='VALUE'/>:
    Returns the value of an input component.
  • <PROPERTY ... name='VISIBLE'/>:
    Defines visibility (for input components and design components).
  • <PROPERTY ... name='WEB/>:
    Returns a boolean value. The form is opened in FirstSpirit ContentCreator (true) or not (false).

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2015-01-20