Stefan Cameron on Forms
Building intelligent forms using Adobe LiveCycle Designer

'Tutorials' Category Archive

Connecting to a Schema

In previous tutorials, I have shown how to connect an XFA form to a database and a web service. Next on the list is the XML Schema (XSD).

If you work in an enterprise setting, chances are you may have already had to deal with corporate data schemas that define how that data is structured. The goal, when connecting a form to a schema, is to ensure that the data consumed and output by the form adheres to a specific structure. Any fields bound to data nodes that aren’t inside the schema space are basically ignored at time of submission.

Continue reading…


Posted by Stefan Cameron on August 3rd, 2009
Filed under Data Binding,Designer,FormCalc,Instance Manager,Tutorials,XFA

Creating and Loading Data Nodes

Have you ever needed to create data nodes in the Data DOM on-the-fly? How about a need to parse XML obtained from a web service data connection in order to find a value for some property? If that’s the case, then you’ll find-out how to do it in this article.

Creating Data Nodes

In a similar article, John Brinkman showed how to create form variable nodes at runtime however what’s not obvious about data nodes is that you don’t create them using

a class name of your choice.

For example, say you wanted to create the following data node structure:

<custom>
    <message>Hello World!</message>
</custom>

 

Continue reading…


Posted by Stefan Cameron on June 1st, 2009
Filed under CM,Data Binding,Instance Manager,Scripting,Tables,Tutorials,XFA

Pre-Process Web Service Responses

Connecting to a web service usually means using import bindings to capture the response but what if you wanted to do something special with the response? What if the response wasn’t exactly correct for merging into your form (e.g. you just wanted to extract a part of the response and push it into your form somewhere)?

You could still use import bindings (set using the “Object palette > Bindings tab > Import/Export Bindings property”) but then you might have to hide most — or all — of those fields if you didn’t want to expose them. You would wait for the web service data connection to execute, then find the field that contains the piece of data you want and set it where it needs to go. This isn’t ideal, however, because Designer doesn’t expose any events, in the Script Editor, that would let you know that you now have data from the web service response in your form. Furthermore, having those extra fields around could add a lot of unnecessary weight (read: file size).

Continue reading…


Posted by Stefan Cameron on March 23rd, 2009
Filed under Data Binding,Designer,Events,Scripting,Tutorials,XFA

Auto-Identify Mandatory Fields

I am certain at some point in time you have had to fill-out some type of form on a website and the required fields were identified by an asterisk (*). This is a common way to communicate to a user which fields are mandatory and which ones aren’t.

This is a design pattern that the Form Guide Team adopted when they conceived the default Form Guide user experience. Since the appearance of a field in a form guide doesn’t have to be the same as that of the field in the form (PDF), they were able to automatically add an asterisk next to mandatory fields without affecting their PDF counterparts.

Continue reading…


Posted by Stefan Cameron on March 16th, 2009
Filed under Acrobat,Form Guides,Scripting,Tutorials

Expandable Table with Totals

It seems that calculating totals in an expandable table with a dynamic/repeatable row is a hot topic lately so I thought I would post a tutorial on how to build a simple table which represents a purchase order where you can add and remove line items and various totals are automatically calculated.

Before we get started, you’ll need Designer 7.1 and Acrobat/Reader 7.0.5 at minimum to run through this tutorial. I will be using Designer 8.2 and Acrobat/Reader 9.0 to do the tutorial so it’s possible some of the UI may have changed slightly since the 7.1/7.05 versions.

Continue reading…


Posted by Stefan Cameron on February 25th, 2009
Filed under Data Binding,Designer,FormCalc,Scripting,Tables,Tutorials,XFA