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

Please how do i add code to enable addition? *All details below*

Community Beginner ,
Sep 10, 2024 Sep 10, 2024

i have a drop down with this code: 

} else if (event.value=="") {
this.getField("Text1").value = "1";
this.getField("Text2").value = "";
this.getField("Text3").value = "KG"
} else {
this.getField("Text1").value = "1";
this.getField("Text2").value = "";
this.getField("Text3").value = "KG";
}

I am trying to add code so i can add all of the weights together for the net weight to be populated in another text box. is this possible and can anyone help me do it please? thank you!

TOPICS
JavaScript
7.4K
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
1 ACCEPTED SOLUTION
Community Expert ,
Sep 27, 2024 Sep 27, 2024

Here is your file with changes made (Step 1), first two fields will work, rest you need to fill on your own:

https://drive.google.com/file/d/1QKDb1RA01bM8x7BGNaz89FBPQVPLNUG1/view?usp=sharing 

View solution in original post

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 ,
Sep 11, 2024 Sep 11, 2024

"if i could have one line bit of code instead of 40 lines of seperate code that would be immense. i am not sure if thats possible though..."  There's a real easy way to do this form by deleting all of your fields except the first row, changing there names to remove all suffixes, anticipating the field names after you use Right-Click > Create multiple copies, using export values in the dropdowns, entering the script that anticipates what the field names will be, then creating the rest of the fields with Right-click > Create multiple copies. This article (with video) explains it all:

https://pdfautomationstation.substack.com/p/anticipating-field-names-in-custom

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