Filling in Forms with Sample Data

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.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)
This entry was posted in ADEP. Bookmark the permalink.

3 Responses to Filling in Forms with Sample Data

  1. 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.

  2. Lee Sutton says:

    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).

  3. Great tool . It will be a lot helpful to designers to make the work easy.