Designer Training at MAX

“Mike Potter”: will be giving a “training session”: on LiveCycle Designer at “Adobe MAX 2006”: next month.

As he prepares for his session, I’d like to give you an opportunity to influence what he’ll talk about so that his session is as valuable to you as possible:

* Are there specific features you’d like to see a demo for? Dynamic Subforms? Conditional Breaks? Data-Nominated Subforms? Data Binding?
* Should he talk about form design methods like why and when to use repeating (dynamic) subforms, how to validate your form prior to submission, etc.?
* Anything else?

Connecting a Form to a Database

In response to “Lala”: and “malik”:’s questions on connecting a form to a database (whether it’s Microsoft Access, MySQL, etc. doesn’t really matter), I decided to write a little tutorial on how to do it.

Even if you already know how to do it, I encourage you to *pay special attention* to the section on *Auto-Incremented Table Columns* because it might help you understand and resolve some of the issues you may have already run into.

Continue reading…

Designer 7 Training by CYTA

I just noticed that Carl Young himself from “Carl Young Training Associates”: is giving a “new course on Designer 7”: this Fall that looks very interesting (here’s the “full course outline”: if you’re looking for details).

They’ll be in *Phoenix*, AZ, Nov. 13 – 14, 2006, and *Houston*, TX, Nov. 27 – 28, 2006.

FormCalc Expressions (If and For)

In Designer, you can write scripts using one of two languages: FormCalc and JavaScript. If you’re like me, you’re more familiar with JavaScript because it’s very similar to Java and JScript syntax but when it comes to FormCalc, you’re lost. Well, not completely but you find it very difficult to find documentation on the syntax for loops (like While, For, etc.) which are sometimes essential. Maybe you fall-back on JavaScript in those times but, on average, *FormCalc scripts execute much faster* than JavaScript scripts so why not harness that performance in our forms?

In this post, I’ll explain the syntax of the *If* and *For* expressions in FormCalc. Those of you familiar with Visual Basic or VBScript will likely find this more familiar than the equivalent JavaScript syntax (while I’ll include for comparison however this isn’t a post on JavaScript syntax). In future posts, I’ll add to this collection by discussing the syntax for *While* and *ForEach* loops.

Continue reading…

Not Just Flash, Flex and Dreamweaver!

Have you seen “Mike Potter’s LiveCycle @ MAX Google Calendar”: ? It’s a great way to see all the “LiveCycle”: -related sessions being offered at the “Adobe MAX 2006”: conference this year.

I think many people still think or expect that MAX is still all about the former Macromedia products such as “Flash”:, “Flex”: and “Dreamweaver”: While there’s still lots of focus on those really cool applications, Adobe has added a whole slew of sessions on LiveCycle products such as “Designer”:, “Workflow”:, “Forms”: and even a preview of what we’ve got in store for “LiveCycle 8”:!

Bug: “Page n of m” Custom Object Broken in Tables

h2. Description

If you use the “Page n of m” object from the Library palette’s Custom tab, you may have noticed a bug when you drag that object from the Library directly into a table cell:

== BugPageNoMCanvas.gif ==

In the image above, the “Page n of m” object circled in green is correct whereas the one circled in red is not.

If you preview the form or run it in stand-alone Acrobat, you’ll get something like this:

== BugPageNoMPreview.gif ==

You can see, in the image above, that the green-circled object is showing the correct page information while the red-circled one isn’t showing any information at all. That’s because the text object from red-circled “Page n of m” object contains broken references to the *Floating Fields* which are used to display the current page and page count information.

Continue reading…

Making a Table of Contents

One of the hottest topics on the “Designer Forums”: these days seems to be methods by which one can add a table of contents to their form. Since there are many different ways to achieve this, I thought I would post a little sample to demonstrate how this can be done.

Of primary concern when adding a table of contents to your form is ensuring that the links provided to the form’s various pages/sections remain valid at all times. Static forms whose page set never changes don’t really need to worry about this but dynamic forms do. That is, regardless of whether content pages are added, re-ordered or even deleted from your dynamic form, you need to ensure that when a TOC link is clicked, the user is taken to the correct page pertaining to the topic they selected.

The best way of ensuring that TOC links don’t get broken as a result of changes to the form’s pages is by using layout information provided by the *XFA Layout Model*. This model provides information such as an object’s actual dimensions (width/height), the page on which it is located as well as a few other interesting pieces of information.

By using the

bc. xfa.layout.absPage

we’re able to get the page number on which an object is currently located, taking into account the various pages which may have been inserted or removed in-between the TOC page and the page in question. Taking that page number and assigning it to the


property then sets the current page to the one on which is located the object in quetsion.

“Download Sample [pdf]”:

*Minimum Requirements:* Designer 7.x, Acrobat 7.x.

Continue reading…

Bug: Cannot Override Calculations

h2. Description

The XFA language supports fields which are calculated yet still overridable by the person filling the form. For instance, you may have an invoice on which you calculate the tax associated with a purchase using a calculated field yet, for customers from other countries, you would like to allow them to override the calculated tax amount and enter the correct amount themselves.

To do this, you would use the Object palette’s Value tab and set the field’s Type property to _Calculated – User Can Override_. You could even go as far as specifying an Override Message which would appear if the user attempted to override the field’s calculated value.

In theory, when the user attempts to override the field’s calculated value, either the Override Message or, if none was specified, an Acrobat default message appears warning that the field is calculated and gives the user the option to continue with the override or to cancel. If the user proceeds with the override, subsequent calculations use the override value instead of the original calculated value regardless of subsequent changes to other fields which the overridden field’s calculations were dependent on.

Unfortunately, there’s a bug in Acrobat that causes the overridden value to be discarded. It manifests itself in a couple of different ways:

# *Dynamic PDF:* Not only will the value specified by the user (the override) not be retained but the Override Message (if specified) won’t be displayed. The behavior is simply to let the user type-in a value but then throw it away and run the calculation again without any warning.
# *Static PDF:* In this case, the Override Message (if specified) is displayed and the user has the option to discard their change or proceed with the override but the specified value is discarded regardless of what they choose to do and the calculation is run again.

Continue reading…

The Bug List Goes Live!

Some of you may have noticed the new “Bug List”: side bar module on my blog recently. I’m excited to launch this new section of my blog tonight and I hope that it’ll add even more value to your visits here as well as to your experience using Designer and Acrobat to design and develop your electronic forms.

Look for a few kick-off posts in the coming days about some bugs that fellow readers and users have reported as well as some that I’ve come across myself while making the various samples I’ve already posted to this blog. Of course, I there shouldn’t be any in the features I worked on… 😉

My hope for this new section is that it’ll serve as a reference for things to watch-out for in the versions of Designer and/or Acrobat that you may be using as well as what to do in order to get around them.

Complex Validations

A couple of days ago, Michael Ramirez “asked me”: how to do complex validations on forms. He asked how one could have a validation as follows: Given 3 text fields A, B and C and a check box E, A is mandatory only if B and C are filled or if E is checked. I thought this would make a great little sample of both complex validation scripts and what I like to call the “Two Button Submit” technique.

“Download Sample [pdf]”:

*Minimum Requirements:* Designer 7.x, Acrobat 7.x.

Continue reading…