Skip navigation
dm7g
Currently Being Moderated

I need to calculate based on a value chosen in a drop down list!

Aug 1, 2012 10:07 PM

Tags: #drop #acrobat #down #dropdown #list #calcuate

Ok, here's the deal.

 

I'm writing an order form for custom guitars.

 

There will be a dropdown list for many things.

 

Example:

 

Body Shape : (Shape A, Shape B, Shape C)  <-(dropdown list)

Body Color : (Color A, Color B, Color C)  <-(dropdown list)

 

all three shapes and colors have different costs.

 

So for example, if the base cost is $450

and chosing

Shape A = +$0

Shape B = +$50

Shape C = +$65

 

Color A = +$0

Color B = +$15

Color C = +$35

 

So after the customer chooses the shape and Color, I want the final price to display in the "Price" box.

 

So if I chose Shape B & Color C in my dropdown list, the price would read $535.

 

Is this possible?

 

If so, do I need to write a seperate calcuation for it?? How do I do it?

 
Replies
  • Currently Being Moderated
    Aug 2, 2012 6:17 AM   in reply to dm7g

    In your comboboxes, add the price values as the Export Value for each item. (e.g. item 'Color B' will have the export value of 15).

     

    Then, for your 'Final Price' field, set the Custom Calculation Script to the following:

     

    var f1 = this.getField('Body Color')

    var f2 = this.getField('Body Shape')

    var f3 = this.getField('Base Price')

     

    event.value = f1.value + f2.value + f3.value

     

    Be sure to change the values in the first 3 lines to the exact names of your 3 fields

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points