I'm trying to create an expression whereby an image will be shown once someone selects an option from a select field. Is this possible? If so, how do I go about it or what expressions would I use?
Drag each image into a dynamic panel.
Create an "On Change" + "Set Active Panel" event, and select the first panel to be set as active.
Create a condition for this event. Drag the dropdown to the first space in the expression, then an '=' and then type in one of the values from the select list. This must exactly match a value from the select list.
Then, repeat this until each panel has been addressed. This is how the final events and conditions should look:
To have an example imagine you want to have 3 images and the options from the dropdown are the thre images.
A good way to simulate this would be to create a dynamic panel with three panels.
then you put each image in a different panel from the dynamic panel.
Now you have to set an event on the selection widget. Choose the "on Change" event and then add a condition. In the condition builder drag the "=" sign and on one side drag the selection widget and on the other double click and write the first item in the list. Then click on ok.
Now you have to define the action for this condition. To do this choose the "Set Active Panel" action and choose the panel that contains the image related to the first item in the selection list.
When the event is created you will see "else". Click it and a new event builder will appear. Repeat the process but this time for the second element; then the third.
I hope this helps you in your prototype.
I built your solution and it worked. My question is this:
1) Lets say your select list is Alaska, California, Texas.
2) Now in the condition builder you put the text as "Alaska", so as of now it would work.
3) Tomorrow I want to change the select list to AK, CA, TX.
4) Would I have to go back into the condition builder and change "Alaska" to "AK"?
I am guessing it is case sensitive, so if you have any typos or change anything it will not work right?
Yes you are right!
Replies have been locked on this page!