Stefan Cameron on Forms
Building intelligent forms using Adobe LiveCycle Designer

Archive for September, 2007

Presence vs Relevance

Designer 7.1 introduced the ability to specify whether a button was visible only on the (computer) screen, only on paper (print) or both (visible all the time). This feature, supported in conjunction with Acrobat 7.0.5, was then extended to all XFA objects (text fields, check boxes, lists, etc.) in Designer/Acrobat 8.0.

Unfortunately, how the two concepts interact is something that isn’t easy to grasp at first and so I thought I would delve into the details and attempt to clarify things.

Note that in this article when I write about Acrobat I include Reader as well.

Before Relevance

Prior to the concept of relevance, an object was either visible, invisible or hidden, as specified by the presence attribute and it didn’t matter whether the form as being rendered on a computer screen or printed on a piece of paper — it could either be seen or not.

One of the problems with this approach to presence surfaced when you wanted to design a form that had a submit button for the electronic “fill & submit” workflow but you also wanted to support the manual “fill, print & mail” workflow. When the user printed the form, they would get this submit button on the print-out which was completely useless and looked out-of-place.

In Designer/Acrobat 7.0 or earlier, if you wanted to prevent the button from printing, you had to resort to scripting the button’s PrePrint and PostPrint events in order to hide the button while the form was being printed:

PrePrint

this.presence = "invisible"; // or "hidden";

PostPrint

this.presence = "visible";

Relevance in Designer 7.1 / Acrobat 7.0.5 – 7.0.9

The advent of Designer 7.1 and Acrobat 7.0.5 introduced support for “relevance” on button objects only. Relevance lets us further define the circumstances where an object is visible.

There are currently two supported “views” to which objects may be relevant: Screen View and Print View. They are both straight-forward: The Screen View represents the form as it is seen on a computer screen (in Acrobat or a browser) and the Print View represents the form as it is seen on paper (after being printed).

The following table illustrates the view(s) in which a form object is visible given values assigned to an object’s presence and relevant properties. For instance, if an object is defined as follows in XFA

<field presence="invisible" relevant="+print">...</field>

it would be included (“in”) only in the Print View.

Relevant Presence Screen View Print View
+print visible in in
-print visible in out
+print invisible out in (visible)
-print invisible out out
+print hidden out out
-print hidden out out

Note that if the relevant property isn’t specified, the presence property controls the object’s inclusion in both views at the same time (as was the case before the introduction of the “relevant” property).

More importantly, notice how setting the presence property to “invisible” and the relevant property to “+print” actually causes the object to be visible in the Print View (rather than invisible). This wasn’t the original intent and was corrected in Acrobat 8.0+.

Relevance in Designer/Acrobat 8.0+

The 8.0 versions not only added support for presense and relevance on all objects (text fields, list boxes, circles, squares, text, subforms, radio button lists, etc.) but they also corrected the results of some presence and relevant property combinations such that the two are now disjoint: The relevant property determines the view (Screen and/or Print) to which an object belongs and the presence property then controls the object’s visibility within that view.

The result is as follows (note the differences highlighted in blue between both tables):

Relevant Presence Screen View Print View
+print visible out in
-print visible in out
+print invisible out in (invisible)
-print invisible in (invisible) out
+print hidden out in (hidden)
-print hidden in (hidden) out

As in previous versions, the omission of the relevant property gives control to the presence property in both views.

Setting Presence and Relevance in Designer 8.0+

Designer exposes presence and relevance via its presence property in the Object palette. It combines the two into the following settings:

Designer XFA Relevant XFA Presence
Visible <not specified> visible
Visible (Screen Only) -print visible
Visible (Print Only) +print visible
Invisible <not specified> invisible
Hidden <not specified> hidden

Differing Behaviors Across Acrobat Versions

Remember that the results of the relevant and presence property combinations are specific to the version of Acrobat being used to view/print the form.

For example, if you designed a form with a button that had

presence="invisible", relevant="+print"

it would be excluded from the Screen View but visible in the Print View in Acrobat 7.0.5 – 7.0.9. However, if you were to open the same PDF form in Acrobat 8.0+, the button would be invisible in the Print View.


Posted by Stefan Cameron on September 27th, 2007
Filed under Acrobat,Designer,XFA

The Adobe User Research Team Needs Your Help!

Our User Research Team is looking to get some information from you about various scripts you may have written for your forms in Designer and they’re offering a $25 (US) Amazon certificate to the first 10 people who respond.

Read their request below and start submitting those scripts!!! 

The Adobe user research team is looking for script descriptions.

In an effort to improve the user experience for Adobe LiveCycle Designer, we would like to pay you to find out what kinds of scripts you use the most. 

We’d like to know in general what your script does and a use case of when you would need it if it’s not obvious from the description.  We don’t want the actual code, just a description.

For example:

Date format validation
range check, to verify that a date entry is in the appropriate range

If you send us a list of your top 10 scripts, we’ll send you a $25(US) certificate on Amazon.  Act fast! This offer is open to the first 10 people who respond.

We are looking for JavaScripts and FormCalc scripts for Adobe Designer 6, Adobe Designer 7 and Adobe Designer 8.  Please specify what version you were using when you send us scripts.

This is open to everyone including Adobe customers, partners and employees.

Send your script descriptions to Lenhardt@adobe.com

Thank you!


Posted by Stefan Cameron on September 13th, 2007
Filed under Designer