The <OptionSelector>
tag generates a control containing a list of radio button or checkbox options. This control only allows users to select one option from the list and can be used as an alternative to drop-down lists.
The data source <BindingProperty>
tag determines the options that are displayed. Within the <OptionSelector>
tag, you can define the style, location, and data source, among other properties.
The following is the XML code used for the form that contains the above example:
Copy
<WF_DynamicForm>
<DataClass>Employee</DataClass>
<FormHeader>
<Style>header</Style>
<Title>
<Caption>Example</Caption>
</Title>
</FormHeader>
<EmployeeHeaderPanel>
<Style />
</EmployeeHeaderPanel>
<FormBody>
<Style>IVFormBody</Style>
<Block>
<NumberOfColumns>6</NumberOfColumns>
</Block>
<Label>
<Style>IVLabelNoBold</Style>
<Block>1</Block>
<Row>3</Row>
<Column>0</Column>
<Caption>lblPayHolidayGroup</Caption>
<MarkAsRequired>true</MarkAsRequired>
</Label>
<OptionSelector>
<Style>IVComboBox2</Style>
<BindingProperty>List_EmployeeEmploymentStatus.PayHolidayGroupId</BindingProperty>
<DataProvider>PayHolidayGroups</DataProvider>
<Block>1</Block>
<Row>5</Row>
<Column>0</Column>
</OptionSelector>
</FormBody>
</WF_DynamicForm>
The <OptionSelector> tag must have the following tags:
<BindingProperty>
<DataProvider>
The following optional tags are supported for use within the <OptionSelector> tag:
<AllowDeselect>
(If this tag isn’t included, it’s set to false by default. A value of true is only supported if IsCheckBox is true and IsRequired is false.)<AuthorizationKey>
<Block>
<Column>
<ColumnSpan>
<DisabledIf>
<DisplayMemberPath>
(If this tag isn’t included, the ShortName of the value is displayed beside the radio button/checkbox by default. Other possible options are LongName and XRefCode. The value that can be displayed depends on the source of the data. For example, if the value doesn’t have a reference code, the XRefCode value isn’t supported.)<DisplayName>
(Identifies the field within error messages. If this tag isn’t included, the value is based on the BindingProperty.)<IsCheckBox>
(If this tag isn’t included, radio buttons are used by default. If this tag is set to true, checkboxes are used instead. When checkboxes are used, users can still only select one option from the list.)<IsReadOnly>
<IsRequired>
<Row>
<RowSpan>
<SelectedValuePath>
(If this tag isn’t included, this value is based on the DataProvider.)<Style>
<Visible>
<VisibleIf>
<ContextVisibleIf>
<Values>
<OnlyContextOptions>
<VisibleIfExclude>
Note: The <OptionSelector> tab isn’t supported within the <Grid>
tag.