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

Autocalulation with IF statement based on previous choice

New Here ,
Nov 22, 2019 Nov 22, 2019

Copy link to clipboard

Copied

I know nothing of Java script, although I am trying very had to learn...

 

I need the structure/format of an auto calulation than adds 1 field and then an ammount (2,4,6 or 8' based on the choices of a set of four check boxes (see image).

 

Any help would be appreciated

Capture.JPG

TOPICS
PDF forms

Views

256

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
Community Expert ,
Nov 23, 2019 Nov 23, 2019

Copy link to clipboard

Copied

You don't need JavaScript for simple calculations.

You should use built in calculations function.

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
LEGEND ,
Nov 24, 2019 Nov 24, 2019

Copy link to clipboard

Copied

The non-custom calculation methods will replce the "Off" value of a check box to 0 so one could just sim the export values of the checl boxes.

 

When a large number of non-custom caclulations are included within a PDF it is possible that they will not work right and then one needs the custom calculations. For that type of help we need more information than an annotated imiage can provide.

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
Community Expert ,
Nov 25, 2019 Nov 25, 2019

Copy link to clipboard

Copied

Calculations do not add fields. What you need is a calculation script that will uses checkboxes to place a value into a field.

You can learn about what you need to do with these links:

https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

https://acrobatusers.com/tutorials/conditional-execution

https://www.pdfscripting.com/public/Calculating-field-values-and-more.cfm

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 ,
Nov 25, 2019 Nov 25, 2019

Copy link to clipboard

Copied

LATEST

I actually worked this out. I didn't realize you could set a value to the check box, so now i simply add lvl and the value to each check box. ty all

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