Skip to main content
Participating Frequently
December 1, 2022
Answered

Getting my form document to work

  • December 1, 2022
  • 1 reply
  • 1373 views

Hi. Thanks for taking any time to review and assist.

I'm creating a 24 page document for flushing multiple pallets. These pages will be needed for each pallet to be flushed that day.

My fields are:

Pallet/Page One

Pallet1 - the first page for the first pallet

Part1 - for the Part Number that pallet will have boxed

ShopOrder1 - the shop order associated with that pallet and customer order number of that day

Quantity1 - number of boxes to that pallet

Initial1 - initials of the person who flushed (entered that pallet into the computer to be sent to shipping) the pallet

Date1 - the current date

 

Pallet/Paget Two (and all remaining pages)

Pallet2, Part2, ShopOrder2, Quantity2, Initial2, Date2

These fields will all be relative to the page number they are on. Page 3 would be Pallet3 and so on.

All fields except Pallet# will be slave to Page 1. Part2 will displate the part number on page two from Part1 of page 1, etc.

Pallet# will increase by one for each page.

Pallet1 will show a value of 01. Page two will show 02, etc.

I'm lost in the syntax and how to get it to display...

 

can anyone assist?

This topic has been closed for replies.
Correct answer Thom Parker

Thanks. I just realized it was having an issue when I enter 01 instead of 1. Yes, it all works fine. Thanks again for all your help and patience.


That might be an issue with interpreting the data type.  The script could be improved by explicitly converting the input value to a number

 

var nPalletNum = Number(event.value);
for(var i=2;i<=24;i++)
     this.getField("Pallet" + i).value = ++nPalletNum;

 

 

1 reply

Participating Frequently
December 1, 2022

I forgot to include that the person flushing any pallets that day/shift will only be changing values on page one. The rest of the pages will be read only. Page 24 will have only Qyantity24 and Pallet24 editable should the last pallet of that order not conform to a standard pallet size. Pallet size (quantity) standard is normally 18, 24, 32, 36, 72. So page 24 I want used for an incomplete pallet when an order has been completed.

Thom Parker
Community Expert
Community Expert
December 1, 2022

The first thing to do is to design your page layout in a word processor, like MS Word. If there are several pages that will have the same design, then only create one page. They can be copied in Acrobat.  

Then convert to PDF and use the "Prepare Form" tools in Acrobat Professional to add interactive fields.

Field naming is important. Fields with the same name are essentially the same field, so the value is copied automatically. 

 

If scripting is required, you can read about it here:

https://www.pdfscripting.com/public/PDF-Form-Scripting.cfm

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
December 2, 2022

So... wait... 

If I put the same field names on each page I can enter values to the first page and the remaining pages would show the same data?

 

If that is true all I need then is to know how to increase field Pallet1 by +1 for each following page...

 

Thanks for the link. I'll check it out tonight.