• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

391

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

Community Expert , 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'.

Votes

Translate

Translate
Community Expert ,
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'.

Votes

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. 

Votes

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...

Votes

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