conditional calculation statement with 4 variables

New Here ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

In a PDF order form, I've created 3 boxes on the same line: Quantity, dropdown option with 4 selections, and TOTAL. How do I calculate the Total = (QTY * Unit Price) when a dropdown option (e.g. Small/Medium/Large/XL) is selected. The unit price for each option is $3, $5, $8, and $10 respectively. I am guessing that I have to get some help with inserting a  conditional Java Script. Can someone share an example? Thank you!

TOPICS
JavaScript

Views

64

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Feb 05, 2021 Feb 05, 2021
Did you set export value for 'Small,Medium...etc' if not add their prices as export values, for example, for small add export value of 3, for medium 6...etc, then use simplified field notation to calculate total. also in dropdown field options tick ' commit selected value immediately'.

Likes

Translate

Translate
Adobe Community Professional ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Did you set export value for 'Small,Medium...etc' if not add their prices as export values, for example, for small add export value of 3, for medium 6...etc, then use simplified field notation to calculate total. also in dropdown field options tick ' commit selected value immediately'.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2021 Feb 08, 2021

Copy link to clipboard

Copied

Thank you Nesa! I will give this a try. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2021 Feb 08, 2021

Copy link to clipboard

Copied

LATEST

Hi again Nesa! Excellent suggestion! It worked form me. Merci...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines