How to create a cascaded list

How to create a cascaded list

 

Suppose you want to load the items in a list based on another list. Cascaded list is the solution. Cascaded list  is very useful if your form involves complex selections.

 

For example, a 'City' list that loads based on a 'State' list

Cities in arizona

Cities in arizona

The cities reloaded

The cities reloaded

 

Creating a cascaded list.

 

First create the parent list (The 'State' list in this example)

Parent list

Parent list

Enable "Load from database" option.

 

Add the items. List of U.S. states in this case :

Add items in the list

Add items in the list

 

Create the 'child' list - a dropdown list of the cities in our example.

 

Create the child list

Create the child list

 

Choose the 'Load from database' option and the 'Cascaded list' option. Then choose the parent list.

 

Now we will add the list items.

List items follow a format

List items follow a format

 

 

Enter the child list items in this format

Parent_item1>

{

child item 1

child item 2

child item 3

}

Parent_item2>

{

child item 1

child item 2

child item 3

child item 4

}

 

and so on

 

For the State->City example:

 

Arizona>

{

Phoenix

Tucson

Mesa

Chandler

Glendale

}

California>

{

Los Angeles

San Diego

San Jose

}

 

Now proceed with uploading your form.

 

1348652662_001_45Cascaded list requires database support. The lists are saved in to the database and are loaded dynamically. So, in the "Take the code" step, it will ask for a MySQL database login even if you have not selected any other database option.

 

1348652662_001_45You can edit the cascaded lists online in the Form Admin Page

 

Edit cascaded list online

Edit cascaded list online

 

1348641443_ktipYou can even build a cascaded multi-select list!

cascaded multi-select

cascaded multi-select