ASP.NET Super Form - Conditional Linked Fields

User Form
First Name
Last Name
Country
State / Province
 
Insert
The Super Form supports the ability of linking fields. Using this feature you can set up some of the fields to depend on other fields. Thus these dependent fields will be enabled / disabled based on the state of the field they depend on. For example some fields can be enabled (editable) only when a check box is checked, otherwise they will be disabled (non-editable).

This example showcases the use of a DropDownListField ("Country") that controls two other fields, based on a condition. When "USA" is selected in the "Country" drop down list, the "State" drop down list is enabled and the "Province" text box is disabled. When any other country other than USA is selected in the "Country" drop down list, the "State" drop down list is disabled and the "Province" text box is enabled.

The DropDownListField exposes various properties that are used to configure the conditional linking:
  • FieldsToEnable - gets or sets a value indicating the fields that will be enabled when some specific items are selected.
  • EnablingValues - gets or sets a value indicating the comma separated item values that will be used by the FieldsToEnable property.
  • FieldsToDisable - gets or sets a value indicating the fields that will be disabled when some specific items are selected.
  • DisablingValues - gets or sets a value indicating the comma separated item values that will be used by the FieldsToDisable property.
ASP.NET
<obout:SuperForm ID="SuperForm1"
     runat="server"
     DataSourceID="SqlDataSource1"
     AutoGenerateRows="false">
    <Fields>
        <obout:DropDownListField DataField="CountryID" HeaderText="Country" Required="true"
         DataSourceID="CountriesDataSource" DataValueField="CountryID" DataTextField="CountryName"
         Default="USA" FieldsToEnable="StateID" EnablingValues="USA"
         FieldsToDisable="Province" DisablingValues="USA" />
        <obout:DropDownListField DataField="StateID" HeaderText="State / Province" Required="true"
         DataSourceID="StatesDataSource" DataValueField="State" DataTextField="State" />
        <obout:BoundField DataField="Province" />
    </Fields>
</obout:SuperForm>
obout.com 
obout.com Home 
News 
Super Form Home   
Super Form Home 
Examples - 64
First Look - 2 
Quick Setup 
Checkout 
Appearance - 3 
Live Styles 
Live Styles for DateFields New 
Auto Format 
Fields - 10 
Auto Generate Fields 
BoundField 
CheckBoxField 
CommandField 
DateField 
DateField with Time New 
DropDownListField 
MultiLineField 
Password Field New 
TemplateField 
Add / Edit / Delete - 7 
Auto Generate Command Buttons 
Customize Command Buttons 
Request User Confirmation 
Add-Only Form 
Edit-Only Form New 
Default Values for Add New 
Save using Stored Procedures New 
Layout - 7 
Vertical / Horizontal Direction 
Field Sets 
Field Sets with Column Span 
Field Sets with Tabs New 
Multi-Step Wizard New 
Multi-Step Survey New 
Width 
Master / Detail - 4 
Master Grid 
Master ComboBox 
Master ListBox 
Add / Edit in Separate Page 
Templates - 11 
ComboBox Field 
On-Demand ComboBox Field New 
Cascading ComboBox Field 
MultiLevel ComboBox Field 
Multi Select ComboBox Field 
ListBox Field 
Multi Select ListBox Field 
HTML Editor Field  
FileUpload Field 
CheckBoxList Field 
RadioButtonList Field 
Validation - 9 
Required Fields 
Type Validation 
ReqEx & Custom Validation 
Validation Summary 
Validator Callout 
Validate Super Form inside Grid New 
Validate Custom DropDownListField New 
Validate using CompareValidator New 
Validate Linked Fields New 
Masks / Filters - 2 
Edit Masks 
Filters 
Linked Fields / Buttons - 4 
Enable / Disable Command Buttons 
Enable / Disable Linked Fields 
Show / Hide Linked Fields 
Conditional Linked Fields 
Client Side API - 1 
External Buttons New 
Server Side API - 1 
Focus New 
Localization - 1 
Localize Date Fields New 
Integration - 2 
Row Edit Template for Grid New 
Grid Editor inside Window New 
Knowledge Base - 1 
Knowledge Base 
Documentation - 6 
Server-Side 
ClientSideEvents 
Direction 
FieldSet 
FieldSetRow 
SuperForm 
ChangeLog