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

Custom Calculation script that uses multiple dropdown lists

New Here ,
Oct 12, 2023 Oct 12, 2023

I have a rudimentary understanding of scripting; however, how do i assign numerical values to textual items in drop boxes to be used in variables for a calculation.

 

i.e. Dropdown1 includes (Dwarf = 10, Elf = 6, Human = 8); Dropdown2 includes (Bard = 6, Cleric = 6, Fighter = 10);

V1 = Dropdown1
V2 = Dropdown2

V3 = Level 

Total HP = V1 + [(V2+ "CON Modifier")V3]

I understand the basis of the script I just need assistiance on how to make the text in the dropdown correlate to a numerical variable.

Thank you for any assistance rendered.

TOPICS
JavaScript , PDF forms
480
Translate
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
Community Expert ,
Oct 12, 2023 Oct 12, 2023
LATEST

Add numbers as export values to choices in dropdown.

tempsnip.png

Translate
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