Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Moving footer to next page

Avatar

Level 1

  Hi,

   I'm new to Livecycle and I have a form that has a textfield that needs to grow (narrative section) and move to a new page. It needs to move the footer also that has the data entry persons info.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

If you are designing a form to be used with  a LiveCycle process then it makes sense otherwise you are better off using the stand alone designer.

Paul

View solution in original post

9 Replies

Avatar

Former Community Member

I am not sure that I follow ...can you post a copy of your form so we can see what you are trying to do?

Paul

Avatar

Level 1

  I would love to post the form but it's a official police form and I can't.  The problem is the document is in a corel wordperfect 8 wpt file with macros. Our unit is still on corel but the rest of the department is using MS word.  Dot file in word that us marcos will not work from a web server. So I'm trying to convert them to PDF forms.  Livecycle can't convert the corel files so I need to open the files with Word and then bring the file into Livecycle. The Wordperfect file has a footer at the bottom of the page and a narrative above it. If the text is more then the page can handle, it moves the footer to the next page at the bottom and the text starts at the top of the second page.

Avatar

Former Community Member

I believe that it can be done but it will involve some scripting to determine how much white space there is then placing the footer at the right spot. Also the form must be setup correctly to allow for the fields to grow etc. How you import the word file will make a big difference on whether you will be able to do this or not.

If you feel better about sending the form to a single person I can take a look at it.

You can send it to LiveCycle8@gmail.com if that suits you.

paul

Avatar

Level 1

Sorry, but I double checked the form and found that it doesn't move the footer but adds a second page with a different footer entry table at the bottom of the second page. I'm sorry to take up your time.

David Dombkowski

Tech Lab

Organized Crime Division

312-446-7621

Sent from my Blackberry Device

Avatar

Level 6

That's fortunate, because I had to do this once and it was a major PITA. The script ended up being pretty simple, but coming up with a scheme that worked took a lot of trial and error.

Paul, I'd like to hear how you would attack this. I wonder if there's a simpler way than what I did.

Avatar

Former Community Member

I would put the code on the layout ready event and ensure that the footer is in a subform. I woudl also have a spacer subform that had nothing in it. This is the subform height that I woudl change whenever the growing subform chnages. Then I can calculate the appropriate height (based on the Content Area height) subtract the height of the footer and subtract the height of the growable subform. The amount left over is the height that the spacer needs to be. The key is getting the height after layout has occured. If you just get the h parameter you are getting it at design time. So if you use the command

xfa.layout.h("Name of object you are trying to get", "units that you want the height in")

Here is an example:

var

oH = xfa.layout.h(txtDescription, "in");

txtDescription.h

= oH + "in";

Does that help?

Paul

Avatar

Level 1

Have anyone worked with Workbench. I was going to download the trial version and install it on one of the windows servers in are unit. I saw a video on it and looked better then using adobe pro for the forms

Avatar

Correct answer by
Former Community Member

If you are designing a form to be used with  a LiveCycle process then it makes sense otherwise you are better off using the stand alone designer.

Paul

Avatar

Level 6

That's sort of the scheme I used.  Instead of using a spacer subform I changed the margin.topInset of the footer section to push it down.

However, for reasons that I can't recall right now, there was a need to do an xfa.layout.relayout() after changing the footer parameters.  Unfortunately this will cause another layout event and an infinite loop.  The calculation and relayout() needed to be conditioned with a flag that only allows it to happen once.  The flag is set on the change event of the field that's being filled in.  When the layout occurs, the calculation is performed, the flag reset and a relayout() done.  The next time through the calculation and relayout() will not be executed.  It only happens when the text above changes.

I also needed to use:

var

lastPage = xfa.layout.absPageCount();

xfa.layout.h("Name of object you are trying to get", "units that you want the height in", lastPage-1)

This will get the height of the part of the fill-in field that is on the last page when the fill-in field spans multiple pages.  Without the page parameter I was getting the height of the object on the first page, which was incorrect.

It was an interesting form to design.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----