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

Not Sure How to do This...

New Here ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

I have created a form in Acrobat where I assigned numerical values to specific check boxes, I then created a text box that added up those values (“TotalValue”); where I am stuck is in trying to tie the total value to a second text box that display a message based on the calculated value.  Please note, I have zero knowledge or skill with JavaScript.

TOPICS
PDF forms

Views

308

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 , May 24, 2017 May 24, 2017

As the custom calculation script of the second field you can use something like this:

var totalValue = Number(this.getField("TotalValue").value);

if (totalValue==0) event.value = "";

else if (totalValue<=2) event.value = "Bad";

else if (totalValue<=5) event.value = "Medium";

else if (totalValue<=8) event.value = "Good";

else if (totalValue<=10) event.value = "Excellent";

I just invented the numeric values and the text descriptions... You can change them to your actual ones, of course.

Votes

Translate

Translate
Community Expert ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

As the custom calculation script of the second field you can use something like this:

var totalValue = Number(this.getField("TotalValue").value);

if (totalValue==0) event.value = "";

else if (totalValue<=2) event.value = "Bad";

else if (totalValue<=5) event.value = "Medium";

else if (totalValue<=8) event.value = "Good";

else if (totalValue<=10) event.value = "Excellent";

I just invented the numeric values and the text descriptions... You can change them to your actual ones, of course.

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 ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

LATEST

Thanks!  That worked perfectly!

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