Expand your knowledge of LiveCycle Designer by using sample forms that demonstrate quick and simple solutions. These samples are grouped into task-based categories to help you identify the samples that most closely match your needs. Play with the sample forms and apply the techniques to your own work.
Send us a sample to have it posted here.
Stefan Cameron (April 23, 2007)
Use the Instance Manager to change the number of columns in a table.
Alex Mitchell (Dec. 11, 2006)
Learn how you can use calculations and scripts to develop and enhance forms created in LiveCycle Designer.
As part of the form authoring design process, you can choose to add calculations and scripts to provide a richer experience for form recipients. The sample forms below are intended to help you better understand scripting in LiveCycle Designer, and provide quick solutions to scripting tasks.
Learn how to manipulate the values of field objects, including images, on your form design.
Use the JavaScript Array object’s built-in sorting function to sort pairs of text and value items at runtime. Developed by Stefan Cameron (August 28, 2006).
This sample demonstrates how to find and perform actions on specific types of form fields. Developed by Stefan Cameron (August 14, 2006).
This sample demonstrates how to use the Acrobat Scripting API within an XFA form to make invalid fields flash red when you attempt to submit the form. Developed by Stefan Cameron (July 31, 2006).
These examples demonstrate different ways to manipulate the value(s) of a choice list.
This example demonstrates how to dynamically change the value of an image field.
This example demonstrates the results you can obtain using the saveXML() and loadXML() XML Form Object Model methods.
This example demonstrates how to calculate the sums of fields located at different levels of the form hierarchy.
This example demonstrates different properties of the Adobe XML Form Object Model that display the value of a field.
This example shows how to reset the values of a specific set of fields, not the whole form. To do this, only reset the fields in the desired subform object.
This example demonstrates how to obtain the current value of a drop-down list as well as the different ways to access the previous value of a drop-down list on a form.
Learn how to alter characteristics of a form object such as appearance, visibility on the form, and behavior based on user interaction with the form.
Learn how to create hotspots on images by using JavaScript objects from Adobe Acrobat. Developed by Stefan Cameron (Nov. 20, 2006).
This sample demonstrates how to add subform instances to your form at runtime and include the new subform as well as its child objects in any form calculations. Developed by Stefan Cameron (July 17, 2006).
This sample demonstrates how to expand multiple text fields to accommodate unlimited text answers. Submitted by Niall O'Donovan (June 19, 2006).
This example demonstrates how to add subforms to and remove subforms from a form at runtime. (May 8, 2006)
This example demonstrates how to add rows to and remove rows from a table at runtime. (May 8, 2006)
These examples demonstrate different ways to control the presence attribute of a button object. To properly view the third example, you will need to open the form in LiveCycle Designer.
This example demonstrates how to change the fill color of a field at runtime.
This example demonstrates the different techniques required to create a script for an object on the body page versus creating a script for an object on the master page. The example uses setFocus.
This example demonstrates how to expand a field to match the height of the content in another field.
This example uses scripting to make a field a required field at runtime.
Field properties changed via scripting should be remembered when you navigate the pages of an HTML form. The same applies when you reopen a dynamic PDF form. In the case of a PDF form, scripting is required to remember the state of the fields.
This example demonstrates how to email a form to an address specified by the person filling the form.
In Adobe Acrobat 6.0, static objects become part of the page. For example, you cannot change the presence of static text at runtime. This sample provides a solution for making the text visible and invisible at runtime. You need to open this form in LiveCycle Designer to properly view the example.
This example demonstrates dynamic subforms and automatic calculations at runtime. Download this Intelligent Expense Report and you will see how interactive PDF enables you to create expense items on the fly and how intelligent PDF performs all of the calculations while you work. Contributed by SmartDoc Technologies.
This example demonstrates how to highlight the current field that a form filler is working with, highlight fields that a form filler is required to fill, and use message boxes to provide feedback to a form filler.
This example demonstrates how to manipulate the visual properties of an object; in this case, a text field.
This example demonstrates how to hide buttons when printing a form, as well as how to hide and show objects at runtime.
This example demonstrates how to change the background color of fields, fillable areas, and subforms on a form, based on user interactions, at runtime.
This example demonstrates two methods for changing the background color of rows and tables, based on user interaction, at runtime.
Learn how to work with various data sources, such as XML data files and databases, as well as how to use XML schemas.
Use URL requests to pass parameters into a PDF form. Developed by Stefan Cameron (March 12, 2007).
Display all records from an ODBC data connection simultaneously for reporting purposes. Developed by Stefan Cameron (Feb. 19, 2007).
Learn how to use LiveCycle Designer to filter records in a database and populate a form with the resulting data. Developed by Stefan Cameron (Jan. 22, 2007).
Learn how to connect to and display records from a database. Developed by Stefan Cameron (Dec. 22, 2006).
Learn how to use the Dynamic Properties feature in LiveCycle Designer to localize field captions using XML Data files. Developed by Stefan Cameron (Oct. 16, 2006).
Learn how to use the new Dynamic Properties feature in LiveCycle Designer 7.1 to automatically add items to lists instead of writing the script on your own. Developed by Stefan Cameron (Sept. 25, 2006).
This sample demonstrates how to map specific subforms to specific data records by using the new Data-Nominated Subforms feature in LiveCycle Designer 7.1. Developed by Stefan Cameron (June 19, 2006).
This example demonstrates how to maintain pre-populated data when importing new data. For example, a customer can fill and submit a form. The person who receives the form needs to import additional data into the submitted form. The form requires scripting to "remember" the pre-populated data when new data is imported.
The first two examples are methods for exporting data. In the first example, the script doesn't supply a file name, so the form prompts the user to give the exported data file a name. In the second example, the script specifies a file name, so a prompt for the user is not required. In the third example, the form is importing data, and the form prompts the user for the data file.
This example demonstrates how to load data from an XML data file into a table. In this case, the table grows to accommodate the number of data entries stored in the data file.
This example demonstrates how to navigate through records stored in an XML data file by using buttons to navigate between records.
Use the Instance Manager to change the number of columns in a table.
Learn how to create customized form layouts and pagination using scripting, as well as the capabilities of LiveCycle Designer objects. Developed by Stefan Cameron (April 23, 2007).
Learn how to use layout techniques to add a dynamic table of contents to your forms. Developed by Stefan Cameron (December 4, 2006).
Learn how to use the addInstance method to add subform instances at runtime. Developed by Stefan Cameron (September 11, 2006).
This sample demonstrates how to specify conditional page breaks depending on imported data values. Developed by Stefan Cameron
This example demonstrates how to convert an existing field value into a comb-like layout.
This example displays two columns of subforms side-by-side. The subforms of the left column are allowed to repeat. The first subform of both columns should be displayed side-by-side even when the content of one column flows onto a new page.
Create a table with one row and two columns where the content of the row is allowed to break between pages. Pay attention to the paragraph alignment of the subforms because it will affect how its content is displayed.
Learn how to incorporate digital signatures into your form designs.
This example shows the relationship between events when the signature is applied, cleared, or cancelled.