Enumeration field (Simplified)
Defines an enumeration field. An enumeration field has a
number of predefined values from which the user can choose. It can
be configured to accept either a single choice or multiple choices
using the multiple
attribute.
Syntax
<field name="NCName" type="enumeration" multiple="(true|false)"? > <enumeration>...</enumeration>+ <constraints>...</constraints>? ANY-FOREIGN-ELEMENT* <parameter/>* </field>
Only one form of the constraints
element may be used:
Boolean constraints.
Examples
This example defines an enumeration field that allows the Content Studio user to select an option from a list.
<field type="enumeration" name="review-type"> <ui:label>Review Type</ui:label> <ui:description>Select the required type</ui:description> <enumeration value="film"/> <enumeration value="play"/> <enumeration value="book"/> <enumeration value="game"/> </field>
Attributes
name="
NCName"
-
The name of the
field
element. Note that no twofield
s belonging to the samepanel
may have the same name. type="
enumeration"
-
Specifies that this field is an enumeration field.
multiple="
(true|false)"
(optional)-
If set to
true
then the field will accept multiple user choices; it is displayed as a multiple-choice list in Content Studio. If set tofalse
or unspecified then the field will only accept a single choice; it is displayed as a combo box in Content Studio.