Avoka Blog: Adobe LiveCycle

July 30, 2008

A fix for some cosmetic differences between Reader 8 and 9

Filed under: Designing Forms, LiveCycle — htreisman @ 5:07 pm

When Reader 9 starts up, by default it clicks the “Highlight Fields” toggle button. In Reader 8, this was unchecked by default.

In general, this is a good thing. It makes it much more obvious to end-users which documents are fillable/editable PDFs, and which are plain PDFs that can only be printed.

However, in some cases, where your user-base is already expecting fillable forms, this means that all your carefully color-coordinated forms now don’t look as good on startup.

Another issue is when you have required fields, which show up with red borders – apart from looking a bit garish, our usability testing has indicated that it can make new users freak out, thinking they’ve already made a mistake before they’ve even done anything.

This is compounded if you have fields with caption above the field, which in Reader 9 is rendering as two red borders, as shown here:

There is a very simple way to preserve the Reader 8 behavior – simply add the following line to the root node of your form:

On Initialize
app.runtimeHighlight = false;

This has been tested in Reader 8.1 and Reader 9.

Note: In Reader 9 the “Highlight Fields” seems as it is clicked even though this line of code deactivate it. Therefore, If you want to click it to highlight the fields you have to click it twice for the first time (1.Deactivate 2. Activate).

Thanks to Mohammad Al-omari for coming up with this code.

Avoka has a LiveCycle Forms JavaScript library that allows you to handle validation errors in a more graceful way, as well as providing a whole lot of other useful utility functions that makes building forms easier, quicker, and more effective. If you’re interested in more information about this library, please email info(at)avoka.com.



  1. I don’t know why the above suggestion do work, but somehow keeps generating report:

    Generating PDF Document…
    Font Service: Default font typeface is Myriad Pro.
    Script failed (language is javascript; context is xfa[0].form[0].form1[0])
    script=app.runtimeHighlight = true;
    Error: app is undefined
    PDF generated successfully.

    1 warnings/errors reported.

    Do you know what causes this and how to solve it?

    Comment by Sylvia — September 1, 2008 @ 5:48 pm

  2. For almost all circumstances, this error will not affect the behaviour of your form can be ignored. You will notice that the error goes away when you save the form as PDF.

    The error is caused by the fact that there is no app (application rendering the form such as Reader) when the form is being rendered on the server-side.

    The different scenarios of how forms are rendered on server and client side is an advanced topic which I cannot do justice to in this comment. However, it is enough to know that usually code that is run on the server-side (which may throw an error such as this) is executed again on the client side where there is no error.

    The only circumstance when this may affect your form is when you are intentionally performing server-side logic only e.g. setting a script to run at server in the script editor. In this case, any code after the app. statement withing the same event will not be processed as the script breaks on error and does not continue processing. It is therefore, good practice to put code such as this at the bottom of your script.

    Comment by Ben Walsh — September 16, 2008 @ 10:41 am

  3. I must be difficult in wanting the best of two worlds here, but what if you want the red borders on the required fields to be turned off but still have the light fill color of the entry field area??

    Comment by Heather — December 20, 2008 @ 12:36 am

    • Hi Heather
      I don’t believe there is any simple way to make that work. It should be possible by directly manipulating the background colour of the field using JavaScript. If you’d like to explore this further, please email info@avoka.com.

      Comment by htreisman — December 23, 2008 @ 8:24 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: