3 Replies Latest reply on May 15, 2017 7:39 AM by try67

    Button to invoke an 'On Blur' JavaScript Action


      I have created a PDF which has form fields and a worksheet on pages 1-3. The overall PDF has over 100 pages with form fields that require the same data (different for each project) repeated on multiple pages. So I don't type the data repeatedly on each page, I enter it once on the worksheet and use an 'Action' to run a JavaScript 'On Blur' to inject the data on all the appropriate pages of the overall PDF.



      The worksheet form field 'Action' JavaScript looks like this...

      // Data entered in this field will populate in the fields below.

      getField("field1").value = event.value;

      getField("field2").value = event.value;

      getField("field3").value = event.value;

      getField("field4").value = event.value;

      getField("field5").value = event.value;



      This example is only one of about 50 fields on the worksheet. As mentioned above this only works with 'On Blur'. That's all well and good if one was entering the data on the worksheet field by field, and if the worksheet was always part of the overall PDF. When working as a team, the worksheet can get filled out separate from the overall PDF. We then insert the worksheet pages into the overall and invoke the 'On Blur' for each field of the worksheet. All data gets injected in appropriate fields just as expected.



      Is it possible to place a button with a macro at the top of the worksheet to invoke an 'On Blur' for all the form fields of the worksheet, all at once or field by field, without manually needing to click in all 50 worksheet fields?