Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Access To Header and Footer Dynamically

Avatar

Level 3

Hello:

I need to be able to put a header and footer dynamically in the form at runtime.  For example: I have a button on my form, when the button is clicked it places certain text in the header and footer of the page.  This has to be done programmatically. thanks in advance....

1 Accepted Solution

Avatar

Correct answer by
Level 10

I will need to see the form to determine what is wrong ....can you send it to LiveCycle8@gmail.com with an explanation please?

Thanks

Paul

View solution in original post

8 Replies

Avatar

Level 10

Click on Master Pages and place the TextFields at top and bottom which will act like Header and Footer respectively..

You can assign values to these controls just like any other Field in the form, by passing the access path. (See the Highlighted section below).

Page1.Subform1.TextField1.rawValue ="Header Text";

Hope this gives an idea..

Thanks

Srini

Avatar

Level 3

Srini:

I sent you example file with some further detail...  I was unable to get your example to find the MasterPage fields.

Thanks

Avatar

Level 10

Billy,

     Here is the corrected form..I placed two buttons when you click them they will ask you to enter Header name and Footer name..

https://acrobat.com/#d=4HKLylqRPkaWdH5EOmW2-Q

     Please verify the code behind these buttons. I am assigning the Header and Footer by

          Form.MasterPage.Page1.TextField1.rawValue

          Form.MasterPage.Page1.TextField2.rawValue

     So in your actual form, you need to refer them the same way and pass the value from where you get it from in your code.

          For example: Form.MasterPage.Page1.TextField1.rawValue = TextField3.rawValue;

Thanks

Srini

Avatar

Level 3

I have a two page form, and one master page.  The text is working for the first page, but the second page does not have the text at the top or bottom even though it is using the same master page.  Any suggestion why the master page would not be the same for both pages?

Avatar

Level 10

Did you assign the Master page to the 2nd page? On the Page 2 object, click on the Pagination palette and on the Place field choose the Master Page you want in the On Page section.

Paul

Avatar

Level 3

Actually it is Page1 follow over to create a second page without a second page object.  So we only have a MasterPage object and Page1 object.

Avatar

Correct answer by
Level 10

I will need to see the form to determine what is wrong ....can you send it to LiveCycle8@gmail.com with an explanation please?

Thanks

Paul