What are the Selection Controls of XForms?
Hello everyone,
I have recently started with the XForms. So you can call me as Rookie for the XForms. I want to know about the selection controls that are used for the XForms. Since the user interface of XForms uses XForms controls, I want to know about it. So please explain me what are the Selection Controls of XForms? Hope that you got the point, that is required for me.!! Reply me as early as possible.!! :notworthy
Re: What are the Selection Controls of XForms?
If you want to select the one item from a list of items, then you can use the select1 control. You want to have a control that suggests a set of values in a drop-down list but also allows a user to type in their own value. Just add the attribute selection="open" to your select1 control, which is shown as follows :
Code:
<xf:select1 ref="demo" selection="open">
Re: What are the Selection Controls of XForms?
I have provided you with an example of the Selection Controls, in which the user can choose one of to values, Single or Married. The data stored in the XForms instance (XML document) will be S or M :
Code:
<select1 ref="status">
<label>Status:</label>
<item>
<label>Single</label>
<value>S</value>
</item>
<item>
<label>Married</label>
<value>M</value>
</item>
</select1>
Re: What are the Selection Controls of XForms?
You can also select many options from the given list, just like the check-boxes that are used in HTML. The following sample of the coding explains the same :
Code:
<select ref="languages">
<label>Languages:</label>
<item>
<label>English</label>
<value>E</value>
</item>
<item>
<label>Russian</label>
<value>R</value>
</item>
<item>
<label>Chinese</label>
<value>C</value>
</item>
<item>
<label>German</label>
<value>G</value>
</item>
</select>
Re: What are the Selection Controls of XForms?
There is also the Range Control in the Selection Controls of XForms. The range control is used for selecting a value from a range of values like the following example :
Code:
<range ref="length" start="0" end="50" step="5">
<label>Length:</label>
</range>
In the example above, the user can choose a value between 0 and 50 in steps of 5.