To add a complex element, such as a form or table, to a dynamic document, you must first create an area for the element in your main document. The methods that you use to do this return an object reference that points to an instance of the type of complex element that you chose.
To fill the form or table, use the methods of this object. Once you have finished designing your document, call themerge_document method for your main document. This places the contents of your complex elements into the main document.
For further information, refer toCreating a Form and Creating a Table.