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

SELECT property

Manipulates the selection behavior of CHECKBOX, COMBOBOX, LIST, and RADIOBUTTON

You can use the SELECT property to manipulate the selection behavior in option-based input component types, i.e.:

SELECT can be used to select the entries of these input components. The entries can be compared with the value of the following input component types:

The (source) input component (“gadget1” in the sample code below) whose value is to be transferred to another input component is specified as follows in the value determination area within the rule definition:

<WITH>
<PROPERTY name="VALUE" source="gadget1"/>
</WITH>

The (target) input component (“gadget2” in the sample code below) that is to receive a value from another input component is specified as follows in the handling instruction area of the rule definition using the SELECT attribute:

<DO>
<PROPERTY name="SELECT" source="gadget2"/>
</DO>

The only values that can be set in the target input component are those that have been defined for this input component via the “values” parameter in the <ENTRIES/> tag (e.g., in the case of CMS_INPUT_CHECKBOX).

If the value concerned is not part of the value set, a warning is displayed on the Java Console:

Invalid value 'e' for property 'SELECT'.

When defining the rules for the aforementioned target input components, it is important to pay attention to the various properties:

 

Selection quantity
(How many values can be selected?)

Removal of selections
(How can selected values be removed again?)

CMS_INPUT_CHECKBOX

0

1

n

Deactivation via the GUI
or DESELECT

CMS_INPUT_COMBOBOX

0

1

 

Deactivation via the GUI or EMPTY

CMS_INPUT_LIST

0

1

n

Deactivation via the GUI
or DESELECT

CMS_INPUT_RADIOBUTTON

 

1

 

Cannot be removed

     

Examples

Example 1) Selecting entries from a list (LIST) by entering a value in a text component

Rules SELECT property

The simple example below illustrates how a value can be entered in a text component (“st_text”) for the purpose of selecting corresponding values in a CMS_INPUT_LIST input component (“st_list”). Within this context, the ENTRY tag is used in CMS_INPUT_LIST to define the values a, b, c, and d.

<RULE>
<WITH>
<PROPERTY name="VALUE" source="st_text"/>
</WITH>
<DO>
<PROPERTY name="SELECT" source="st_list"/>
</DO>
</RULE>

If a is entered in the text component, a is likewise selected in the list. If b is entered in the text component, b is likewise selected in the list. The selected entries can be deselected via the “Remove” function on the GUI.

If the value entered in the text component is not part of the value set for the CMS_INPUT_LIST component (e.g., m), a corresponding warning is output on the Java Console.

Alternatively, the list component can also be populated dynamically with values from a database table (using CMS_INCLUDE_OPTIONS).

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.7 | Data privacy