Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Create a Table of Contents in LiveCycle Designer

Avatar

Former Community Member

Hi Everyone,

Can any one please show me how to create a form with table of contents (TOC). I have a form that contains 8 pages with 8 sections and the customer want

to have a TOC so they can just click on it and it will directly go to a specific section without scrolling down of the form. They want it to work like a TOC that

people used in Microsoft Office. Is it possible to have it done in LiveCycle Designer? If so, could anyone please show me how to create it or if you have any

sample please post it on this forum. Any advise/help would be appreciated.

Thanks in advance,

Han Dao

11 Replies

Avatar

Level 10

Hi,

Jono's solution in http://forums.adobe.com/thread/429150?tstart=0 would work for you.

Place buttons over the TOC elements (without fill or borders) then in the click event have Javascript similar to this:

xfa.host.setFocus(xfa.form.form1.page2.TextField1); //page2 being your page number and TextField being the first object on that page

If you don't have hte TOC set out then you can use buttons with fill and borders.

Also Paul has other solutions for TOC, search the forum for "Table Contents" and then click options to select the LiveCycle Designer ES forum from the list box.

Hope this helps,

Niall

Avatar

Former Community Member

Han,

LiveCycle Designer is not the tool for creating bookmarks. You can create the PDF in Designer and then add bookmarks with Acrobat.

However, a word of caution. As far as I know, if you create a dynamic PDF with Designer where subforms span pages (the PDF page count increases/decreases), bookmarks lose their relevence. You cannot predict where content will be.

The attached image shows a PDF open in Acrobat and the dialogue for managing bookmarks. You first create a bookmark by clicking the icon I highlighted in green. Once the bookmark is created you then click the icon highlighted in yellow to manage the bookmark.

Steve

Avatar

Level 10

Hi Steve,

I was working on this when you posted.

When we have a dynamic form, we use a hidden numericField on the each page which counts that page number. Then the button jumps to that page number (which may have changed). A bit arkward, but it works.

Potentially another option....

N.

Avatar

Former Community Member

Niall when I've tried third option I'm getting an error:


page3 is not defined
1:XFA:form1[0]:#subform[3]:Table5[0]:Row1[2]:Button2[0]:click
I've looked at scriptand this is what I have for that page counter:

----- form1.#subform[6].thisPage::click: - (JavaScript, client) ------------------------------------

I cannot add page3 to this description.

What I'm doing wrong?

Thanks

Avatar

Level 10

Hi,

When you are copying script from one form to another, it is important that you amend the script so that it refers to objects in the new form.

"page3" in the script refers to what I have called a particular page. Similarly, "thisPage" is a numeric field on page3.

The script in the click event:

xfa.host.currentPage = page3.thisPage.rawValue - 1;

will only work if you have a pages called "page3" and an object in that page called "thisPage".

Hope that helps,

Niall

Avatar

Former Community Member

Naill,

I've done everything as you said look:

first file (button1.jpg) shows script ofr the button and

second (target. jpg) script for the obgect on the page 3

and when I try to test it debugger still pops up with error:


page3 is not defined
1:XFA:form1[0]:page2[0]:Table5[0]:Row1[2]:Button1[0]:click
page3 is not defined
1:XFA:form1[0]:page2[0]:Table5[0]:Row1[2]:Button1[0]:click

Thanks a lot for your help with this.

Avatar

Former Community Member

Strange things going on with my form. The first button doesnot want to work, however I followed the same principle and 10 other buttons work perfectly. I still cannot figure it out where is the trick with first one?

Avatar

Former Community Member

Niall!

I've managed to get it to work, I had to paste a new page and move staff into it but it did the job!

Thanks a lot for the script!

Next task is shrinking and contracting text fields.

Best regards

Avatar

Level 10

Hi,

Glad you got it working!!

The issue in the previous post is that the script used "page3" whereas the page was called "Page3". Small difference but enough to throw an error.

Javascript is case sensitive.

Good luck,

N.

Avatar

Former Community Member

Niall, good morning!

Soory to bother you. Do you know the solution to the following problem:

In my form if you say tab on to tick box and do paste than in random place a comment box will appear with text from the clipboard. Is it possible to stop end user to paste into the field of the document but allow them to paste into the text fields?

Thank you

Avatar

Level 10

Hi,

You can control this in the File / Form Properties  and PDF Security tab.

Select "Use a password to open" and then from the drop down select an appropriate level of control for the users. For example "Commenting" includes stamps, which is what you are seeing on your form.Setting the security to "Filling in only" will prevent the behaviour you are seeing.

This will require you to set a passowrd, which you will have to input everytime uou open the form in LC. Therefore it is worth setting this towards the end of development.

Good luck,

N.