cancel
Showing results for 
Search instead for 
Did you mean: 

Based on drop down list relavant icon should get displayed

Former Member
0 Kudos

Hi All,

Based on the drop down list i need to to display relevant icon on the form .For that I guess I need to do Scripting ,do any body have idea on how to display the icon based on drop down list.

The form is Interactive form.

Accepted Solutions (0)

Answers (1)

Answers (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi,

You can do it by using script(FormCalc or JavaScript):

Create icons using image UI element, place these images on a location in the layout. and hide all of them.

Now on change event of dropdown write the following code:

if ($.rawvalue eq <value1>)

then

icon1.presence = "visible"

icon2.presence = "hidden"

icon3.presence = "hidden"

elseif ($.rawvalue eq <value2>)

then

icon1.presence = "hidden"

icon2.presence = "visible"

icon3.presence = "hidden"

.

.

.

.

so on...

This is a sample code. varify the syntex from Adobe livecycle designer help before using it. Check the help about presence property of UI Elements.

Regards,

Vaibhav

Former Member
0 Kudos

Hi Vaibhav,

Thanks for the info.

I tried this scripting but failed.

Do you have any code which similarly talk this fucntionality,I tried in so many places but faile dto get the one I needed.

Let say Drop down has two fields

text 1,2

then i need to display icon for 1 in red and 2 in green the field would be image .

Now can you simulate this and let me know if you have any similar code for this.

Thanks,

Amit

Former Member
0 Kudos

Hi Mate,

make all the icons

On the exit event of the drop down have this below code.

if(this.rawValue == 1){

form1....icon1.presence = "visible"; // have the icon1&2 absolute paths

form1....icon2.presence = "hidden";

}

else{

form1....icon1.presence = "hidden";

form1....icon2.presence = "visible";

}

This should solve your problem,

Cheers,

Sai