Welcome to the third and final part of a three-part post series tutorial on importing data into a form guide and a PDF. The first part covered the form design, the second part covered the Flex code and the third part will cover designing and debugging the form guide that will complete the solution.
Form Guide Layout
The goal is to design a form guide which will provide two panels: one for user options and the other for results.
The first panel will expose the 4 fields inside the GuideObjects subform (which are only meant to be exposed in the form guide — hence why the GuideObjects subform has the Initialize script to hide it if the host isn’t “Flash”). The user will have the option to choose an actor and/or category for further filtering and will then click on the GetMovies button to execute the request on the Movie Service. When the requested XML is returned to the form guide, the GetMovies result handler will convert the XML into instances of MovieRow inside the Listing table.
The second panel will use a repeater layout to expose the Listing table’s contents within the form guide however this panel will only be accessible if the movie query returned 1 or more results.
Once the results are in, the user will then be able to switch (”flip”) to the PDF view which will show the Listing table in the form, from which the user could then print or archive the results.
Continue reading…
Posted by Stefan Cameron on November 19th, 2008
Filed under
Acrobat,
Bugs,
Conferences,
Debugging,
Form Guides,
Scripting,
Tables,
Tutorials
Welcome to the second in a three-part post series on importing data into a form guide (and, by extension, a PDF form). In the first part, we designed the XFA form that will provide us with the print/archive view of the movies retrieved from the Movie Service. The second part will focus on the special Flex code we will need to include in the form which will ultimately be executed by Flash when it runs in the form guide which we’ll design in part 3.
Flex Code in XFA Forms
The key to today’s tutorial is understanding when and where the script you write in an XFA form (JavaScript or FormCalc) is compiled or interpreted.
Continue reading…
Posted by Stefan Cameron on November 18th, 2008
Filed under
Conferences,
Designer,
Form Guides,
Instance Manager,
Scripting,
Tables,
Tutorials,
XFA
As I mentioned earlier, I’m working on a tutorial in the spirit of the Adobe MAX 2008 conference which I’ll make available next week. There will be 3 posts, one for each day of the conference.
This tutorial will show you how to (1) design a form with a table that has a repeating row, (2) add some Flex code to it that will enable the use of the mx.rpc.http.HTTPService class for retrieving data from my Movie Service and (3) design a form guide that will capture the data from the service and transfer it into the PDF which could then be used to print or archive the movie listings.
In an effort to wet your appetite, I thought I would get the ball rolling by showing a little preview of the final solution.
Be sure to come back every day, Monday to Wednesday next week (November 17-19, 2008), to get the full tutorial.
Posted by Stefan Cameron on November 14th, 2008
Filed under
Acrobat,
Conferences,
Designer,
Form Guides,
Tutorials
The scenario
You have a compliant form that has sections for users to fill-in information. Because the form is compliant (i.e. its layout has received the “stamp of approval” and cannot change without another lengthy approval process), the sections cannot grow (they cannot expand-to-fit all of the text users may fill-in). To provide more space for users to add more text, you’ve provided an expandable “overflow” section at the end of form since expanding that section will not affect the portion of the form which has been approved.
The problem
You need to capture the text entered into the form using an interactive Form Guide which is not limited to the restrictions of the form’s approved layout. As such, the Form Guide will capture the text in a single field and you need that text to be entered into the PDF version of the form. If you put all the text into the appropriate section on the form, it won’t fit and the text will be cut-off (e.g. it will not print entirely and you will miss some of the important information).
You need some way to automatically split that text between the small section in the form and the overflow section at the end of the form. In other words, you need to ensure that only the text that can fit within the small form section is placed there and the rest is placed in the overflow section at the end.
In Designer 8.2, the content of fields can now be split between pages however in this case, you can’t use this feature because the small form section can’t be expanded (it’s fixed in size).
The solution
This is the problem Stephanie, Glenn and I were faced with on a recent customer visit. Stephanie took the time to put this into a sample form which provides the script we wrote to handle this task. It’s basically a mini text parser written in JavaScript that splits text between two fields with a fixed-width font (e.g. Courier New, Lucida Console, etc.).
Posted by Stefan Cameron on July 10th, 2008
Filed under
Acrobat,
Designer,
Form Guides,
Scripting,
Tutorials
A colleague of mine on the Form Guide Team, Gilles Maurice, has assembled an extensive video-based tutorial on customizing Form Guides (a new Flash/Flex-based form technology available as of LiveCycle Designer 8.1) using Flex Builder, sample code included.
This tutorial goes beyond the customizations you can do with the Guide Builder tool and uses Flex Builder to create customized guide and panel layouts as well as customized components for displaying data and more. If you’re in to form guides or you’re curious about what you can do with this technology, this should be well worth your time!
Posted by Stefan Cameron on April 14th, 2008
Filed under
Form Guides,
Tutorials