Filling the List items

This applies to dropdownlist and multi-select listbox. Both of these elements allow free editing of the list items.

Here is the simple format to follow while creating the list

 

In the  'List Items' tab you can enter the items for the list. The simple format is one item per line, like this:

Select ...

Red

Blue

Green

Magenta

Black

 

If you want the values to be different from the item name, separate it with a comma

 

Example:

Select ...,0

Red, #f00

Blue, #00f

Green, #0f0

Magenta, #f0f

Black, #000

 

etc.

 

If the item name or the value needs to contain comma, place the item in double-quotes:

 
Select ...,0

"Red, Green, Blue", 1

"Purple, Yellow, White", 2

 

Having items selected by default

If you want some items selected by default, have a third item as selected or y

 

Example:

Magenta, #f0f,selected

Black, #000

 

or, to keep the name and value the same,

Green

Magenta,,selected

Black

 

Or

 

Green

Magenta,,y

Black,,y

White

 

1348652662_001_45For dropdownlist, only one item can be selected at a time. If you have selected more than one items, the first item is taken as selected.

Using Certain Letters (, and ") in the List

If the item itself contains comma, enclose the item in double quotes ( " ).

Examples:

"$2,000"

"10,000",10000,selected

"12,999","12999",selected

"square, rectangle, random shape"

If the item contains double quotes( " ), use two quotes instead of one and enclose the item within double quotes.

For example, if you want to add an item 12"3' to the item list, it should be "12""3' "

More Examples:

"91""2' "

"9,1""2' "

"9.99"" "

"The ""Real"" Experience"

Cascaded Lists

Cascaded lists change the items when its parent list's selection is changed.

Suppose the parent list contains items like this:

 

Select ...

Parent 1

Parent 2

Parent 3

Parent 4

 

The cascaded list can contain items like this:

Select ...

Parent 1>

{

Item 1.1

Item 1.2

Item 1.3

Item 1.4

}

Parent 3>

{

Item 3.1

Item 3.2

Item 3.3

Item 3.4

}

Fixed 1

Fixed 2

Fixed 3

 

Notice that not all the parent items have child items in the cascaded list. You can have items that will always be present, irrespective of the selection in the parent list too. (Such as the Fixed 1, Fixed 2 and Fixed 3 above)

Using comma and double-quotes (, and ") in the List

if the parent item has , or " (comma or double-quotes), you have to enclose the whole item in double quotes.

To escape double quotes in the string, add another double-quotes: See the example below:

" 5"" 6'   >"

{

none

" 1"" 3' "

" 2"" 7' "

}