Copy link to clipboard
Copied
I just got my fingers on javascript and my first step was to create my own form by adapting the example file in this tutorial:
https://acrobatusers.com/tutorials/js_list_combo_livecycle/index.html#
In the example the masterlist contains three information: assembly, parts and price.
The partslist in the second dropdown depends on the assembly selection in a first dropdown. The Price shown depends on the selection in the second dropdown.
What I'm struggling with is that I need a fourth information, lets call it "color", in the masterlist.
How do I have to extend the masterlist or is the idea tottaly wrong? Just adding the additional infromation in brackets obviously doesn't work at all.
example from the tutorial:
var oAssemblyParts = { Chasis: [ ["-","None"],["Rear Bracket",205.95],
A hint in which direction to work would be great. Thank you all.
Copy link to clipboard
Copied
What should happen at selecting "color" in the masterlist?
Copy link to clipboard
Copied
The "color" value needs to be inserted in several different places in the form. So it has to seperated from the price value in some way.
Copy link to clipboard
Copied
Why not? That's exactly what you should do.
So this:
Chasis: [ ["-","None"], ["Rear Bracket",205.95], ["Front Bracket",185.95], ["Long Support",44.95], ["Front Bearing",48.95]
can become something like this:
Chasis: [ ["-","None", "None"], ["Rear Bracket",205.95, "Red"], ["Front Bracket",185.95, "Green"], ["Long Support",44.95, "Blue"], ["Front Bearing",48.95, "Black"]
Copy link to clipboard
Copied
That was my first attempt but made a mistake because in some place the value for "price" ist text. My seperation was incorrect. I used quotationmarks for each value. It works if you put is as a package in quotes, seperated by a comma.
The solution came from the tutorials author in a similar question that I found by accident.
https://answers.acrobatusers.com/using-event-changeEx-q40824.aspx
Thank you for your help.
Problem solved