These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Preserve Header & Footer in Text Field that flows across a page - How?

gazcross
Registered: Nov 1 2009
Posts: 4
Answered

Hi,

I'm trying to create a form, where the main text field flows onto the next page (which I have go it to do). I have created two master pages, the first page and the continuation page. I want the main text field to expand onto the continuation page, while preserving the footer of the main page and the header/footer of the continuation pages. On the continuation page I have a name field on the top of the page, I want this to be the value of the same text box from the main page, how do I achieve this.

I just want text to be written in the main area on the first page to continue into the main area of the second page. I want the second page to replicate as many times as it needs to fit the text in.

HELP! PLEASE!!

Gareth

The form is attached to this thread -> http://forums.adobe.com/thread/516502?tstart=0

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You are not going to be able to do this with Master Pages. A new page uses one Master Page as the background. You can't use elements of both. In fact, after looking at your form I can see that you are approaching this in the wrong way.

Master pages are supposed to contain relatively static info that does not change page to page, header and footer text, graphics, etc. You don't put interactive form fields on a Master Page. Master pages also define a content area where the regular form stuff, graphics and interactive fields, are placed. You have to size this content area so that on a dynamic form, these regular form graphics and fields do not overwrite the static text on the master pages.

Thats the first bit. Next, in order for your form to automatically expand into as many pages as are needed, the top level subform has to be "Flowed". All the graphics and fields it contains have to be sized and arranged so that they flow in a way that looks good. Usually this means dividing your form into vertical sections and encapsulating each section in a subform. You'll need to place your main expandable text field into a subform, even though it's only one field, it needs to be in a subform so that the flow dynamics can be controlled.

Each expandable subform that can break across pages can also have a header and trailer subform that is repeated everytime a new page is created. This is the feature you need to use.

Please watch this video. It's about scripting, but it talks a great deal about how to structure fields and subforms on a dynamic form.
https://admin.adobe.acrobat.com/_a200985228/p87746471/

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

gazcross
Registered: Nov 1 2009
Posts: 4
Firstly, Thanks for your help, I have got my head around the whole thing now.

I only now have 2 problems, where one is relatively minor and the other is aesthetic.

The first problem is in regards to the master pages. I have created two master pages, the first, which contains the standard header/footer for the first page and the second the contains the standard header footer for the second page and onwards. I have controlled the reoccurrence of the first page so when the main text field spills out it spills onto the second master page.

On page 1, there is the main form, within this form there are 2 sub forms, one of which is:

titleForm - which contains all the standard stuff that's required for the first page and a load of dynamic fields. It includes a field called "statementOf' which is where the person would write their name. This sub-form sits within the flowing form and has a "positioned" property, to keep the layout etc.

The next subform within the main form contains the main text for the form. This subform is set to flow and the contents are set to break across pages.

The form works exactly how I wanted it to, apart from.....

Page2 (master page) has a page number area and an area that shows should show the value of the "statementOf" field from the subform "titleForm" which is contained within the main form page. This is a text field object that I have also called "statementOf". I have tried adding some java into the initialise function for the field that is located on master page 2, however, the code I inseted did not pull the value from the main form across when the new page was created. The Code I wrote was:

this.rawValue == form1.PG1.titleForm.statementOf.rawValue;

This didn't work!

I have tried a load of other bits and bobs and the persons name just won't show up in the field contained on the second page. HELP!

The second problem is in relation to the size of the titleForm sub form. It has assumed a height when I created it, which I cannot reduce, so it "eats away" on the space set aside for the main text. The border of the subform is about 2cm away from the nearest object, so I can't work out why it's not snugging up to the last object. HELP

I have attached the amended form to a reply on the following post - MG11(new).pdf:
http://forums.adobe.com/message/2360271#2360271
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
To share a value across several fields, those fields need to have the same name and global binding.

Subforms inside Flowed and autosized subforms want to be large enough to fit thier contents. How they grow and resize depends on how they are anchored and where the contents are placed. Just as an experiment, move the fields to the top of the subform and resize from the bottom.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script