Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Is it possible to show first item in a Drop down list

Avatar

Level 3

Is it possible to automatically display the first item in a drop down list ?

The reason I ask is  ... I am generating pre-filled PDF forms using XML data files.

Whenever there is a certain type of data I am populating a drop down list for the user to review.

Currently, the user must click on the drop down to see if data is there regardless of whether there is no data at all or many data lines of data..

I would like to make it clear to the user whether or not there is any data - right awa.y

I have considered creating a display item next (like a check box or a text field ) next to the drop down and setting it to cindicate if there is data, etc -

but i thougth that I would ask if the drop down could simply be set to automatically display the first item in the list (this is the preferred functionality)

If this is not possible I can always create a check box and set it if there is any data as an  indicator for the user ..

Thanks

2 Replies

Avatar

Level 6

To display the first item of a drop list:

Click the drop list

Look at your pallette

Click the Object Tab

   and then the Value tab

You can now designate the default value

Avatar

Level 10

You can do this way..

Place the code in Inititalize event with Java Script

if(DropDownList1.rawValue == null)

    DropDownList1.selectedIndex = 0;

You need to check if the Dropdown has a value selected from the previous save.. If not then set the selected item to 0th index. (which is 1st one in the dropdown values)..

Thanks

Srini