2 Replies Latest reply on Oct 4, 2012 6:07 AM by hroddy

    How to script in Adobe Acrobat Pro?

    hroddy

      I'm trying to get a text box to display a word based on the total of another text box.

       

      Example:  If total in "Dropdown100" equals 37 to 45 then textbox called "rating2" will read Exceeds

      If total in "Dropdown100" equals 23 to 36 then textbox called "rating2" will read Proficient

      If total in "Dropdown100" equals 7 to 22 then textbox called "rating2" will read  Below Expectations

      If total in "Dropdown100" equals 0 to 6 then textbox called "rating2" will read Unsatisfactory

       

      I'm new to adobe and I'm trying. . . Please Help

        • 1. Re: How to script in Adobe Acrobat Pro?
          George_Johnson MVP & Adobe Community Professional

          You could use something like the following as the custom Calculate script for the rating2 text field:

           

          // Custom Calculate script

          (function () {

             

              // Get the value of the dropdown

              var v = getField("Dropdown100").value;

             

              // Set this field value based on the value of the dropdown

              if (v <= 6) {

                  event.value = "Unsatisfactory";

                  return;

              }

           

              if (v <= 22) {

                  event.value = "Below Expectations";

                  return;

              }

             

              if (v <= 36) {

                  event.value = "Proficient";

                  return;

              }

             

              if (v <= 45) {

                  event.value = "Exceeds";

                  return;

              }

           

          })();

          • 2. Re: How to script in Adobe Acrobat Pro?
            hroddy Level 1

            Thank you so much.  The script worked perfectly.