Expand my Community achievements bar.

SOLVED

Highlight Fields as default for PDF Forms

Avatar

Former Community Member

Hello all,

     I've recently designed a PDF form with some required fields, which get marked in red as soon as you open the form. However, some Acrobat Reader users have to click first on "highlight fields" in order to see the required fields. Is there a way to set "highlight fields" as a default for this form?

Cheers,

David

1 Accepted Solution

Avatar

Correct answer by
Level 10

Put this in the Layout:Ready event of the main form (default is form1 in the hierarchy):

if (!app.runtimeHighlight){
     app.runtimeHighlight = true;
}

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Put this in the Layout:Ready event of the main form (default is form1 in the hierarchy):

if (!app.runtimeHighlight){
     app.runtimeHighlight = true;
}

Avatar

Former Community Member

Thanks for the tip! It worked perfectly!
Cheers,

David

Avatar

Former Community Member

The suggested code didn't work for me with Adobe Reader 8.0.  However, since I am a novice at this, I may not be adding the code correctly -- can you please tell me if this JavaScript client code for layout:ready is correct or not?  I added the code in red.  (I am using LiveCycle Designer ES Version 8.2.1.4029.1.523496).  It seems to be in the right place because if I alter the code to unconditionally set app.runtimeHighlight to false, then when I open up the form with Reader 9.0, the highlighted fields are off.

form1.#pageSet[0].Page1.CurrentPage::ready:layout - (JavaScript, client)

{

this.rawValue

=xfa.layout.page(this);

// Turn on highlighted fields

if

(!app.runtimeHighlight)

{

app.runtimeHighlight

= true;

}

}

form1.#pageSet[0].Page1.PageCount::ready:layout - (JavaScript, client)

{

this.rawValue

= xfa.layout.pageCount();

// Turn on highlighted fields

if

(!app.runtimeHighlight)

{

app.runtimeHighlight

= true;

}

}