These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Populate a field that is dependent on two other ddl

kball
Registered: Nov 3 2010
Posts: 7

I'm less than a novice!!
 
I'm creating an order form for employees to purchase company shirts.
 
So far I have a Quanty, Shirt (ddl), Color(ddl dependent on Shirt choice), Size (dependent on Shirt choice) and Unit Price field (dependent on Shirt & Size).
 
The form works how I want it to so far. When a specific shirt is selected, the appropriate Colors and Sizes become available.
 
I'm stuck on how to get the appropriate value to populate in the Unit Price.
 
I've tried writing and if statment for the Unit Price but I'm not sure if that is the best way to go about it.
 
Scenario is...
  
If Shirt "A" is selected and if either Size "1","2" or "3" is chosen the Unit Price is $x.xx" If Shirt "A" is selected and Size "4", or "5" is selected, the Unit Price is $xx.xx
 
And so on and so forth for all four shirt choices.
 
I've created the form in JavaScript.
 
Any thoughts on the best way to approach Unit Price??
 
Katie

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Have you looked at Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker. A little more complex than your situation, but the principal will still be the same and this method can be easier to update than using a nested if or switch statement within each field. You will have a document level section of code that will hold all the data that needs to be changed and only the labeled value needs to be changed rather than having to goto each drop down list or text field and changing the program code.

George Kaiser

kball
Registered: Nov 3 2010
Posts: 7
It looks like my form may be more complex than this one. The Color field also depends on the Shirt choice.

I tried using using this form but couldn't get it to work out.

Looks like I'm going to create and distribute multiple Order Forms *sigh*

Thanks for the response though!
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi kball,

While this is on the more advanced side of things,you can accomplish what you want through scripting and you don't "have to" distribute multiple order forms. If time is short, you may want to consider posting the project to the Job Board here- plenty of experts hang around here with the scripting skills to do this.

Hope this helps,

Dimitri
kball
Registered: Nov 3 2010
Posts: 7
Time is short, I've been trying to put this order form together for over a week now and had let employees know that I would send out the shirt orders this week.It's almost the end of the week.

I'm new to this site, so I'll check out the Job Board when I get home and see about posting what I have.

I was so determined to do this on my own, but with zilch experience, I'm in WAY over my head!

Thanks Dimitri!

Katie
kball
Registered: Nov 3 2010
Posts: 7
I got an extension!

So, I created the form, but can only get it to work on one line.

If I try to add another line, the data on the original disappers...


I hope this link works....

https://acrobat.com/#w=zLCtNAKPenucCTwBRSGvuw

Please help and tell me that it's a simple fix

~Katie


adragton
Registered: Nov 14 2010
Posts: 3
kball

Still not working.
https://acrobat.com/#w=zLCtNAKPenucCTwBRSGvuw

-adragton