Used to create controls that allow the selection of one and only one item. With the <select1> tag you can create a Radio Button List, a Drop-Down List, or a Single-Selection List Box (see "appearance" attribute below). A list isn't a list without items to select. To understand how to add items to your list, see the Populating the List section below. As with all XMod tags, the <select1> tag also has a required child tag: <label> </label> The text you place between that tag pair is the caption that will be used to identify the control. See the example.
ref |
Name of the field whose value you wish to insert (Required) [String value] Names must begin with a letter and may only include letters, numbers and the underscore character. |
class |
Name of the CSS Class used to style the text box (Optional) [String value] |
appearance |
Used to indicate the appearance of the control at runtime (Optional) [String value] Use this attribute to indicate the type of control that should be created. Possible values are: - full: Generates a RadioButton List - compact: Generates a Single-Select List Box - minimal: Generates a Drop-Down List Box If appearance isn't specified, "full" is assumed. |
query |
This attribute allows you to tie XMod in with other tables in your database. XMod will take the first column and use that as the Display Text. It will use the second column as the item's value. If only one column is returned XMod will copy the value from that column into both, the Display Text and Value. Any more that 2 columns are ignored. Basic security checking is done on the query to help avoid SQL injection attacks or inadvertent deletions, but this SHOULD BE USED WITH CAUTION. Example of using query attribute |
required |
If true, the user will be required to enter a value (Optional) [true or false] |
style |
Same as the HTML style attribute.It allows you to apply CSS styling to the element (e.g. "color: red; border: solid 1px black;") (Optional). [String value] |
rows |
A numeric value greater than or equal to 1 that determines the number of rows to display in a list box. Applies only if appearance = "compact" (single-select listbox) |
cellpadding |
Sets the distance (in pixels) between the border and contents of the cell. Applies only when appearance="full" (radio button list) and repeatlayout="table" |
cellspacing |
Sets the distance (in pixels) between cells. Applies only when appearance="full" (radio button list) and repeatlayout="table" |
repeatdirection |
Sets a value that indicates whether the control displays vertically or horizontally. Applies only when appearance="full" (radio button list) |
repeatcolumns |
Sets the number of columns to display in the control. Applies only when appearance="full" (radio button list) |
repeatlayout |
Use this attribute to specify whether the items in the control are displayed in a table. If this attribute is set to "table" the items in the list are displayed in a table. If this attribute is set to "flow", the items in the list are displayed without a table structure. Valid values: table and flow |
errormessage |
If the field is required but has not been filled out by the user, XMod will display the contents of this attribute. If this attribute isn't specified, XMod will default to "FieldName Is Required" (Optional) (new to version 3.0) |
accesskey |
In browsers that support it, this property can be set to a character on the keyboard that can be used to set focus to the control. For instance, setting the value to F allows the user to access the control by pressing Alt+F on their keyboard (for Windows machines) |
Color of the background of the control. |
|
Color of the border around the control. Valid only for radio button list (appearance="full") |
|
Style of the border around the control. Valid only for radio button list (appearance="full") |
|
borderwidth |
Width of the border around the control, specified in units. Valid only for radio button list (appearance="full") |
enabled |
Whether the control accepts input. May not work in older browsers. Valid values are true and false. The default value is true. |
A series of attributes such as font-bold, font-size, etc. that allow you to control how the text in the control is displayed. Click the link for more for the list of properties and their description. |
|
Color of the text within the control. |
|
height |
The height of the control, specified in units |
The tab order of the control. |
|
textalign |
The alignment of the text label with respect to each item in the list. Valid values are left and right. Default value is left. Valid only for radio button list (appearance="full") |
tooltip |
Text displayed in the tooltip that appears when the mouse hovers over the control. Valid only for radio button list (appearance="full") |
width |
The width of the control, specified in units. |
Javascript can be attached to certain events raised by this control. Click the link for more information. |
The caption used to identify the control |
|
This child tag can be used for most anything but is typically used to display more information (usually in a help-related context) about the data entry item. |
|
Defines a list of items to be displayed in the control |
Much like an HTML <table> tag has child tags, you include child tags in within the <select1> </select1> tags to instruct XMod how to populate your list. To construct the list, you use the <items> </items> tag pair. Within that pair, you include <item> tags for each item in the list. At least one <item> is required and each <item> must contain one <label> and one <value> tag. Below are descriptions of each tag. Check out the Example for more information on how to use the tags. The list can also be populated via a SQL Query (see "query" attribute)
Displays a single-column radio button list with "Female" pre-selected.
<select1 ref="rblGender" appearance="full" class="NormalTextBox">
<label>Gender: </label>
<items>
<item>
<label>Male</label>
<value>M</value>
</item>
<item selected="true">
<label>Female</label>
<value>F</value>
</item>
</items>
</select1>
Displays a 2-column radio button list with no item pre-selected. The user must select an item.
<select1 ref="rblIncome" appearance="full" class="NormalTextBox" required="true" repeatcolumns="2">
<label>Income Level</label>
<items>
<item>
<label>Up to 15,000</label>
<value>1</value>
</item>
<item selected="true">
<label>15,001 to 25,000</label>
<value>2</value>
</item>
<item>
<label>25,001 to 50,000</label>
<value>3</value>
</item>
<item>
<label>50,001 to 75,000</label>
<value>3</value>
</item>
<item>
<label>75,001 to 100,000</label>
<value>4</value>
</item>
<item>
<label>100,001 and above</label>
<value>5</value>
</item>
</items>
</select1>
Displays a drop-down list box with "25,001 to 50,000" pre-selected.
<select1 ref="rblIncome" appearance="minimal" class="NormalTextBox">
<label>Income Level</label>
<items>
<item>
<label>Up to 15,000</label>
<value>1</value>
</item>
<item>
<label>15,001 to 25,000</label>
<value>2</value>
</item>
<item selected="true">
<label>25,001 to 50,000</label>
<value>3</value>
</item>
<item>
<label>50,001 to 75,000</label>
<value>3</value>
</item>
<item>
<label>75,001 to 100,000</label>
<value>4</value>
</item>
<item>
<label>100,001 and above</label>
<value>5</value>
</item>
</items>
</select1>