Ok, so here's what I've done to get it work (plaese remeber, that it's only for testing purposes):
1. New Form
2. Save it as Dynamic PDF Form
3. Add all the images using Image Field (remember to check "Embed Image Data"). In my example the images present three signs: "s", "s$" and "s$X" (I know they are weird, but heck, it's just an example). The images have following names in the hierarchy: ImageField1, ImageField2 and ImageField3
4. I'm putting the DropDown list into the form. Here's the trick, you can't get the NEW value of the dropdown if you use just .rawValue with change event. You have to use a method from EVENT xfa model. This method is xfa.event.newText and it represents the NEW value of the dropdownlist. Remeber to put text values to the dropdown: s, s$ and s$X
5. Now we have to do some scripting (and as for everybody who's an expert, I know my script sucks but I made it in 2 minutes so be cool about it ^^). Choose the dropdown, choose the CLICK event, change the language to javascript and RUNAT Client. Paste the following script:
var val = xfa.event.newText;
if(val == "s") {
ImageField1.presence = "visible";
ImageField2.presence = "invisible";
ImageField3.presence = "invisible";
}
if(val == "s$") {
ImageField1.presence = "invisible";
ImageField2.presence = "visible";
ImageField3.presence = "invisible";
}
if(val == "s$X") {
ImageField1.presence = "invisible";
ImageField2.presence = "invisible";
ImageField3.presence = "visible";
}
6. Save the form and try it. You can download it at:
http://oceanic.wsisiz.edu.pl/~kordulas/ftp/formularze/tests/images.pdfMy e-mail address is kordulasinski.krzysztof@gmail.com
please contact me if you have some more work ;)