Skip to main content
Participant
September 15, 2016
Question

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

  • September 15, 2016
  • 3 replies
  • 338 views

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}

This topic has been closed for replies.

3 replies

Inspiring
September 15, 2016

If you're using the Adobe Sign service when you "send the form out for signature", then it won't work the way you expect. JavaScript actions are not supported in this workflow. You can set up an Adobe Sign workflow so that certain calculations are performed, but this is not done via JavaScript and you'll need more than the basic plan that's included with Acrobat.

A more involved workflow that can work with your current form is to email the form to people who then complete the form using Acrobat or Reader and send it back to you. You can then flatten the form and have them sign the flattened version via Adobe Sign.

JR Boulay
Community Expert
Community Expert
September 16, 2016

Hi.

Layers aren't supported too.

Acrobate du PDF, InDesigner et Photoshopographe