I am designing a form which basically allows a number of choices for photoframes / pictures some of which are mutually exclusive. This is my first attempt at using livecycle so I'm a little in the deep end.
Problem 1:
I have set options in an xml file to provide the choices but have one annoying problem in that one of the dropdowns will force the description when a duplicate value is present eg.
eg. In my xml file I have:
[code][Frames>
[option type="Wood sm " price="13.5"/>
[option type="Wood med " price="18."/>
[option type="Wood lg " price="25"/>
[option type="Nielsen sm " price="18"/>
[option type="Nielsen med" price="25"/>
[option type="Nielsen lg " price="32"/>
[/Frames>
Note: opening square bracket is intentional since I am told I cannot post html so had to change them. In the xml of course they are all left chevrons[/code]
What happens here is that if "nielsen sm" or "Nielsen lg " is chosen the field will ber forced to "Wood Med" or "wood lg".
The field is bound to "frames" but it appears that "type" is being overuled by the value and since it finds a value of 18 in "wood med" it chooses that even though "Nielsen sm" was chosen. This appears to be a bug as it's nonsensical to me.
I can stop this happening by simply making the text slightly different eg. putting "18." but that seems unecessarily clumsy to me.
Dynamic properties for this field are:
Items : Frames.option[*] Item text : Frames.option.type Item value: Frames.option.price
Is this normal and should I be doing this differently?
Problem 2:
I have two columns that relate to size and mount type. eg. 5 sizes and 2 mounts. The first two sizes should allow only two of the 4 possible mounts and the other three would allow the other two. Basically I am giving the choice of two types of small or large mounts and want to limit the data shown in the dropdown list.
XML:
[PicSize> [option dim="7x5" price="7.5" mount="smount"/> [option dim="9x6" price="12.5" mount="smount"/> [option dim="8x10" price="15" mount="smount"/> [option dim="A4" price="18" mount="lmount"/> [option dim="A3" price="25" mount="lmount"/> [/PicSize> [Mounts> [option des="sm " price="2.25"/> [option des="sm backed" price="3.0"/> [option des="lg " price="3.5"/> [option des="lg backed" price="4.5"/> [/Mounts> Note: opening square bracket is intentional since I am told I cannot post html so had to change them. In the xml of course they are all left chevrons
So if 7x5 or 9x6 are chosen the mount choice would appear as "sm" and "sm backed".
This I'm sure isn't a problem I simply don't quite know how to do it so if someone could show me the way to handle this situation I'd be grateful.
L
The same solution works for using a one drop list to modify the contents of another.
Read this article:
http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script