qSIListForm : qSIListForm Pages : Behavior Page : Form

Form
The Form page contains the following elements:
 
Table 13. Form
See the Custom Action Help chapter on how to write a custom action to initialize the list form.
Form Component Behavior
This section is used to control the conditional behavior of the different components in the form, such as a field, a group of fields or a tab. There are four different conditional behaviors that can be specified: Show When, Hide When, Enabled When, and Disabled When. For fields, there are four additional conditional behaviors that can be specified: Valid When, Invalid When, Required When, and Default When.
 
You can define one or more form component definitions.
 
Table 14. Definition
To see details for a form component, you can configure the following properties:
 
For fields of type text, numeric or date/time, regular expression matching can be used for validation. Use the “Matching” operator in the conditional behavior element.
The following are some examples of how to use this property:
1
<orFmComponentBehavior>
    <Component Type="Group" ID="ResolvedFieldsGroup">
        <ShowWhen>
            <Eq><FieldRef Name="Status"/><Value Type="Choice">Resolved</Value></Eq>
        </ShowWhen>
    </Component>Enable the "Amount Paid" field when the Invoice Status fie
</FormComponentBehavior>
2
<FormComponentBehavior>
    <Component Type="Field" ID="Amount Paid">
        <EnabledWhen>
            <Eq><FieldRef Name="Invoice Status"/><Value Type="Choice">Paid</Value></Eq>
        </EnabledWhen>
    </Component>
</FormComponentBehavior>
3
<FormComponentBehavior>
    <Component Type="Field" ID="Reason">
        <HideWhen>
            <Neq><FieldRef Name="Project Status"/><Value Type="Choice">Behind</Value></Neq>
        </HideWhen>
    </Component>
</FormComponentBehavior>
4
<FormComponentBehavior>
    <Component Type="Field" ID="Assigned To">
        <InvalidWhen Message="Assigned To Must be filled if Status is In Process">
            <And>
                <IsNull>
                    <FieldRef Name="AssignedTo" />
                </IsNull>
                <Eq>
                    <FieldRef Name="Status" />
                    <Value Type="Choice">In Progress</Value>
                </Eq>
            </And>
        </InvalidWhen>
    </Component>
</FormComponentBehavior>
5
<FormComponentBehavior>
    <Component Type="Field" ID="% Complete">
        <ValidWhen Message="% Complete must be between 0 and 100">
            <And>
                <Geq>
                    <FieldRef Name="PercentComplete" />
                    <Value Type="Number">0</Value>
                </Geq>
                <Leq>
                    <FieldRef Name="PercentComplete" />
                    <Value Type="Number">1</Value>
                </Leq>
            </And>
        </ValidWhen>
    </Component>
</FormComponentBehavior>
6
<FormComponentBehavior>
    <Component Type="Container" ID="Initiation">
        <DefaultWhen>
            <Neq><FieldRef Name="Project Status"/><Value Type="Choice">In-progress</Value></Neq>
        </DefaultWhen>
    </Component>
</FormComponentBehavior>