Filling in Forms with Sample Data

| 2 Comments

The "Fill Form" button on this sample can be dragged and dropped into your Designer Custom Object Library and reused on other forms to help populate those forms with random sample data. The script in the button simply looks through the form (xfa.form) finding each of the fields (using myNode.nodes.item(0).className) and filling in their values.

2 Comments

Great tool for all versions of Designer!

You'll also find that LC Designer ES has built-in capabilities for generating sample data by going to the "File > Form Properties" command and choosing the Preview tab. There, you'll find a "Generate Preview Data" button. It has facilities to generate an XML data file taking into account fields as well as repeating subforms.

Excellent point Stefan. To add a little more detail to the reasons behind the "button", from the Barcoded Forms perspective it's important that fields be filled to their maximum capacity as well as allow the user to select which characters they wish to use when testing the form. Accented characters or double-byte character set characters can take up 4 times more space than an English language form.

In addition to the sample data, the code behind the button demonstrates to a developer how to traverse an entire document and the objects within that document. Which, come to think of it, I could demonstrate a little more affectively (new sample soon).

Leave a comment

Pages

Powered by Movable Type 4.261

About this Entry

This page contains a single entry by Lee Sutton published on December 18, 2007 2:46 PM.

LiveCycle - Quick and Dirty Server Sizing was the previous entry in this blog.

Invoke LiveCycle with Visual Basic .NET 2005/2008 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.