selectFromList

The selectFromList element defines how options are defined and displayed.

selectFromList Element

tog_minusElement Structure

The selectFromList element structure is as follows:

<xs:complexType name="selectFromList">

   <xs:complexContent>

      <xs:extension base="tns:button">

         <xs:sequence>

            <xs:element name="selectFromListOptions" type="tns:choiceOption"  minOccurs="2" maxOccurs="unbounded" />

            <xs:element name="isMandatory" type="xs:boolean" />

         </xs:sequence>

      </xs:extension>

   </xs:complexContent>

</xs:complexType>

tog_minusSub-elements

The selectFromList element contains the following sub-elements:

Name

Data Type

Comment

selectFromListOptions

choiceOption

Defines the option specifications.

isMandatory

boolean

Specifies input validation before sending input to the server. The element also adds an asterisk indication before the buttonLabel indicating this functionality.

tog_minusselectFromList Example

This section presents a sample selectFromList element, followed by the JSON content that builds the UI representation.

SelectFromListExample

"sectionChoices" : [ {

            "id" : "1341387025372-9255fd13a1812ac0861b7bad3b9b13850e58607-5bd7",

            "choiceValue" : "1341387025371-9102fd13a1812ac0861b7bad3b9b13850e58607-5c70",

            "selectFromList" : {

              "id" : "1341387025372-9255fd13a1812ac0861b7bad3b9b13850e58607-5bd7",

              "buttonVisible" : true,

              "buttonLabel" : "Click to select an option",

              "selectFromListOptions" : [ {

                "id" : "1341387025371-9101fd13a1812ac0861b7bad3b9b13850e58607-5c71",

                "buttonVisible" : true,

                "buttonLabel" : "This is your first choice"

              }, {

                "id" : "1341387025371-9102fd13a1812ac0861b7bad3b9b13850e58607-5c70",

                "buttonVisible" : true,

                "buttonLabel" : "This is your second choice"

              }, {

                "id" : "1341387025371-9103fd13a1812ac0861b7bad3b9b13850e58607-5c6f",

                "buttonVisible" : true,

                "buttonLabel" : "This is your third choice"

              }, {

                "id" : "1341387025371-9104fd13a1812ac0861b7bad3b9b13850e58607-5c6e",

                "buttonVisible" : true,

                "buttonLabel" : "This is one more choice"

              }, {

                "id" : "1341387025371-9105fd13a1812ac0861b7bad3b9b13850e58607-5c6d",

                "buttonVisible" : true,

                "buttonLabel" : "This is someone elses choice"

              }, {

                "id" : "1341387025371-9106fd13a1812ac0861b7bad3b9b13850e58607-5c6c",

                "buttonVisible" : true,

                "buttonLabel" : "This is the most common choice"

              }, {

                "id" : "1341387025371-9107fd13a1812ac0861b7bad3b9b13850e58607-5c6b",

                "buttonVisible" : true,

                "buttonLabel" : "This is the last choice"

              } ],

              "isMandatory" : true,

              }

          } ]

 

        } ]