3 Replies Latest reply on Sep 23, 2016 7:13 AM by pbscoach

    JavaScript works when I preview form but not when I send out for signature

    pbscoach

      I have a very basic form that asks 10 questions on the first page.  The answers the user enters are copied to 10 fields on the second page of the form as view only. The user then puts in a priority number next to each answer.  The last page then lists the top 5 answers.

       

      When I preview the form in Adobe Acrobat Pro DC, it works fine.  When I send the form out for signature, it doesn't work.

       

      All the JavaScript is run on blur.  The first item is to copy the question (Goal 1) to the answer field on page 1 (Answer 1)

       

      var question = this.getField("Goal 1")

      var answer = this.getField("Answer 1")

       

      {answer.value=question.value}

       

      The second item the user enters a priority number (Priority 1) to decide if the answer (Answer 1) is a top 5.  If it is, then it puts it in the appropriate field on the last page (Goals-90 Days 1):

       

      var priority = this.getField('Priority 1');

      var goal = this.getField('Answer 1')

      var goals1 = this.getField('Goals-90 Days 1');

      var goals2 = this.getField('Goals-90 Days 2');

      var goals3 = this.getField('Goals-90 Days 3');

      var goals4 = this.getField('Goals-90 Days 4');

      var goals5 = this.getField('Goals-90 Days 5');

       

      if (priority.value == '1') {goals1.value=goal.value}

      if (priority.value == '2') {goals2.value=goal.value}

      if (priority.value == '3') {goals3.value=goal.value}

      if (priority.value == '4') {goals4.value=goal.value}

      if (priority.value == '5') {goals5.value=goal.value}