itp:question element
<itp:question
( id= )?
>
( <itp:order-response/> )?
( <itp:keylist-prompt/> )?
( <itp:paragraph-set/>
<itp:textblockserver>
<itp:server/>
<itp:port/>
<itp:environment/>
</itp:textblockserver> ) ?
<xforms:.../>
( <itp:helptext/> )?
( <itp:feedback/> )?
( <itp:layout-hint/> )?
</itp:question>
Description
The <itp:question> element defines a single question on the form. This element contains the XForms representation of the question and some optional components which affect how the question is displayed.
Attributes
| Attribute | Description |
|---|---|
| id | This optional attribute specifies the ID(…) keyword used to identify this question for use with the SHOW/SHOWNOT keywords. |
Content
| Element | Description |
|---|---|
| <itp:order-response> | This optional element is used in textblock selection and multiselect questions to indicate that the form should allow the user to order the responses. |
| <itp:keylist-prompt> | This optional element is used in keyselection forms to provide a description for the selection list. |
| <itp:interact> | This element has an itp:type="keyselection" attribute. |
| <itp:paragraph-set> | This optional element is used in a textblock selection and specifies the textblock view from which the textblocks can be selected by the user. |
| <itp:textblockserver> | This optional element is used in a textblock selection and specifies the textblock server and environment from which the textblocks can be selected by the user. |
| <itp:helptext> | This optional element specifies a helptext for the question. It is only generated if the question has an HELPTEXT element. |
| <itp:feedback> | This optional element specifies feedback messages for the question. It is only generated if the form was previously rejected because of an invalid response or if one or more ERRORCONDITION statement in the form were triggered. |
| <itp:layout-hint> | This optional element specifies a layout hint for the question. It is only generated if the question has an LAYOUT element. |
The following XForms elements can currently occur within an <itp:question> element.
| Element | Used for |
|---|---|
| <xforms:select> | Any multiselect question with a picklist. |
| <xforms:select1> | BOOL question, any question with a picklist. |
| <xforms:input> | NUMBER and TEXT questions. |
| <xforms:upload> | Text question with a FILE modifier. |
| ( <xforms:submit>)* | Keys in a keyselection form (one <xforms:submit> element for each key displayed). |
The list can be expanded in future versions of KCM.
Example
<itp:question>
<xforms:input/ >
<itp:helptext>Provide the age of the customer.</itp:helptext>
<itp:feedback>The age should be between 18 and 35.</itp:feedback>
</itp:question>