When a form is filled or submitted, you can keep a record of the form, in print or in document format. This record is referred as a Document of Record (DoR). It is a print-friendly copy of the submitted form. You can also refer the document of record for the information customers have filled at a later date or use the Document of Record to archive forms and content together in PDF Format.
To create a Document of Record, an XFA or Acroform based template is merged with data collected via an adaptive form. You can generate a Document of Record automatically or on-demand.
The on-demand option allows you to specify a custom XFA or Acroform based template to provide a custom appearance to your Document of Record.
You can:
Before you start learn and ready the assets required for a Document of Record:
Base template: An XFA template (XDP file) created in Forms Designer or an Acrobat Form (AcroForm). Base template is used to specify styling and branding information for a Document of Record. Upload your XFA template (XDP file) to your AEM Forms instance before
Adaptive Form: An Adaptive Form for which the Document of Record is to be generated.
Upload your XFA template (XDP file) to your AEM Forms instance. Perform the following steps to configure an Adaptive Form to use XFA template (XDP file) as template for Document of Record:
Your Adaptive Form is now configured to use an XDP file as template for Document of Record. The next steps is to bind Adaptive Form components with corresponding template fields.
Upload your Adobe Acrobat PDF (Acroform) to your AEM Forms instance. Perform the following steps to configure an Adaptive Form to use Adobe Acrobat PDF (Acroform) as template for Document of Record:
Your Adaptive Form is now configured to use an Acroform as template for Document of Record. The next steps is to bind Adaptive Form components with corresponding template fields.
When an Adaptive Form is configured to automatically generate a Document of Record, every time a form is changed, its Document of Record is updated immediately. For example, if a field is removed from an existing adaptive form, the corresponding field is also removed and is not visible in the Document of Record. There are many other advantages of automatically generating Document of Record. :
Perform the following steps to configure an Adaptive Form to automatically generate a Document of Record:
Bind Adaptive Form fields with template fields to display captured form data in corresponding Document of Record Field. To bind Adaptive Form components with corresponding document of record template fields:
Open the Adaptive Form, configured to use a custom form template for editing.
Select an Adaptive Form component and click open Configure icon. It opens properties browser.
In the properties browser, browse and select a field.
Click Save.
You can use Send Email, Experience Manager Workflow submit action in conjunction with Document of Record step, and other submit actions to receive a Document of Record.
Adaptive forms and corresponding document of record templates can evolve over the period of time. You can choose to add, remove, or modify fields to an Adaptive Form or a Document of Record template.
When you make changes to a Document of Record template and upload the changed Document of Record template to AEM Forms, the Adaptive Forms editor automatically detects the changed bindings and informs you about the adaptive form components that require new bindings. It allows you to make incremental updates to a Document of Record template.
For example, an Organization, We.Retail, has an AcroForm-based Document of Record template, we-retail-invoice.pdf. The template looks like the following:
After using the template for some time, organization decides to rename invoice-number
field to bill-number
field and capture email address of buyers. A developer updates name of the invoice-number
field and adds an email field to the template. He also creates a new version of template called we-retail-invoice-v2.pdf.
The developer uploads and applies to the updated template to the adaptive form. The adaptive form automatically detects and displays list of fields where binding has changed.
The form developer binds Adaptive Forms fields with corresponding Document of Record template.
Now, when the Adaptive Form is submitted an updated Document of Record of record is created.
Keep in mind the following considerations and limitations when working on Document of Record for Adaptive Forms.
The following table describes Adaptive Form components and corresponding XFA components and if those appear in a Document of Record.
Adaptive Form component | Corresponding XFA component | Included by default in Document of Record Template? | Notes |
---|---|---|---|
Button | Button | false | |
Check box | Check Box | true | |
Date picker | Date/Time Field | true | |
Drop-down list | Drop-down List | true | |
Scribble Signature | Signature Scribble | true | |
Numeric box | Numeric Field | true | |
Password box | Password Field | false | |
Radio Button | Radio Button | true | |
Text box | Text Field | true | |
Reset button | Reset Button | false | |
Submit button | Email Submit Button HTTP Submit Button |
false | |
Terms and conditions | true | ||
File Attachment | false | Not available in Document of Record template. Only Available in Document of Record through attachments. |
Adaptive Form component | Corresponding XFA component | Notes |
---|---|---|
Panel |
Subform |
Repeatable panel maps to repeatable subform. |
Adaptive Form component | Corresponding XFA component | Notes |
---|---|---|
Image | Image | The TextDraw and Image components, whether bound or unbound, always appear in the Document of Record for an XSD-based Adaptive Form, unless excluded using the Document of Record settings. |
Text | Text |
The Adaptive Forms table components such as header, footer, and row map to corresponding XFA components. You can map repeatable panels to tables in Document of Record.
Base template provides styling and appearance information to Document of Record. It allows you to customize default appearance of auto generated Document of Record. For example, you can use base template to add your company logo in the header and copyright information in the footer of the Document of Record.
The master page from base template is used as a master page for Document of Record template. The master page can have information such as page header, page footer, and page number that you can apply to Document of Record. You can apply such information to Document of Record using base template for auto generation of Document of Record. Using base template enables you to change default properties of fields.
Always follow Base template conventions when you design base template.
A base template is used to define header, footer, styling, and appearance for a Document of Record. The header and footer can include information like the company logo and copyright text. The first master page in the base template is copied and used as a master page for the Document of Record, which contains header, footer, page number, or any other information that should appear across all pages in the Document of Record. If you use a base template which does not conform to base template conventions, the first master page from the base template is still used in Document of Record template. It is highly recommended that you design your base template as per its conventions, and use it for auto generation of Document of Record.
Master page conventions
In the base template, name the root subform as AF_METATEMPLATE
and the master page as AF_MASTERPAGE
.
The master page with the name AF_MASTERPAGE
located under the AF_METATEMPLATE
root subform is preferred for extracting header, footer, and styling information.
If AF_MASTERPAGE
is absent, the first master page present in the base template is used.
Styling conventions for fields
To apply style on the fields in the Document of Record, the base template provides fields located in the AF_FIELDSSUBFORM
subfrom under the AF_METATEMPLATE
root subform.
The properties of these fields are applied to the fields in the Document of Record. These fields should follow the AF_<name of field in all caps>_XFO
naming convention. For example, the field name for check box should be AF_CHECKBOX_XFO
.
To create a base template, do the following in Forms Designer.
Click File > New.
Select the Based on a template option.
Select the Forms - Document of Record category.
Select DoR Base Template.
Click Next and provide the required information.
(Optional) Modify the styling and appearance of fields that you want to apply on the fields in the Document of Record.
Save the form.
You can now use the saved form as a base template for Document of Record. Do not modify or remove any scripts present in the base template.
Modifying base template
Strictly follow above mentioned conventions and instructions to design a base template.
While generating a Document of Record, you can change branding information for the Document of Record on the Document of Record tab. The Document of Record tab includes options such as logo, appearance, layout, header and footer, disclaimer, and whether or not you want to include unselected check box and radio button options.
To localize the branding information that you enter in the Document of Record tab, ensure that the locale of the browser is set appropriately. To customize the branding information of Document of Record, perform the following steps:
Select a panel (root panel) in the Document of Record and then tap .
Tap . The Document of Record tab appears.
Select either the default template or a custom template for rendering the Document of Record. If you select the default template, a thumbnail preview of the Document of Record appears below the Template drop-down.
Based on whether you select a default or a custom template, some or all of the following properties appear in the Document of Record tab. Specify the below mentioned properties to define the appearance of the Document of Record:
Basic Properties:
Form Field Properties:
Master Page Properties:
If you are using an Adaptive Form template created with a version of Designer prior to 6.3, for Accent Color and Font Family properties to work, ensure that the following is present in your Adaptive Form template under the root subform:
<proto>
<font typeface="Arial"/>
<fill>
<color value="4,166,203"/>
</fill>
<edge>
<color value="4,166,203"/>
</edge>
</proto>
To save the branding changes, tap Done.
You can configure the Document of Record template directly from the Adaptive Form editor or Adaptive Form template editor.
Perform the following steps from the author instance of Adaptive Form editor:
Select the Adaptive Form container (Root) component.
Click icon to open the Properties of the Adaptive Form container.
Open the Document of Record Template tab and select from the following options:
None: When this option is selected no Document of Record template created for your Adaptive Form.
Associate Form Template as Document of Record Template:When this option is selected, XFA Form is used as a template for Document of Record.
Generate Document of Record: When this option is selected, the Document of Record template is automatically generated for your Adaptive Form.
Tap to save the properties.
When Document of Record template is created using an Adaptive Form Template editor, then only two options are available under Document of Record Template tab as None and Generate Document of Record.
Your Adaptive Form may be a lengthy one with several form fields. You may not want to save a Document of Record as an exact copy of the Adaptive Form. Now you can choose a table or column layout for saving one or more Adaptive Form panels in the Document of Record PDF.
Before generating a Document of Record, in a panel’s settings, select Layout For The Document of Record for that panel as Table or Column. The fields in the panel get organized accordingly in the Document of Record.
Fields in a panel rendered in a table layout in the Document of Record
Fields in a panel rendered in a column layout in the Document of Record
Document of Record settings let you choose options you want to include in the Document of Record. For example, a bank accepts name, age, social security number, and phone number in a form. The form generates a bank account number, and branch details. You can choose to display only the name, social security number, bank account, and branch details in Document of Record.
Setting of the Document of Record component are available under its properties. To access the properties a component, select the component and click in the overlay. The properties are listed in the sidebar, and you can find the following settings in it.
Field level settings
Exclude From Document of Record: Setting the property true excludes the field from Document of Record. This is script-able property named excludeFromDoR
. Its behavior depends on Exclude fields from DoR if hidden form level property.
Display panel as table: Setting the property displays panel as table in Document of Record if panel has less than 6 fields in it. Applicable for panel only.
Exclude title from Document of Record: Setting the property excludes title of the panel/table from Document of Record. Applicable for panel and table only.
Exclude description from Document of Record: Setting the property excludes description of the panel/table from Document of Record. Applicable for panel and table only.
Form level settings
An XCI file helps you set various properties of a document. Forms as a Cloud Service has a master XCI file. You can use a custom XCI file to override one or more default properties specified in the master XCI file. For example, you can choose to embed a font into a document or enable tagged property for all the documents. The following table specifies the XCI options:
XCI option | Description |
---|---|
config/present/pdf/creator | Identifies the document creator using the Creator entry in the Document Information dictionary. For information about this dictionary, see the PDF Reference guide. |
config/present/pdf/producer | Identifies the document producer using the Producer entry in the Document Information dictionary. For information about this dictionary, see the PDF Reference guide. |
config/present/layout | Controls whether the output is a single panel or paginated. |
config/present/pdf/compression/level | Specifies the degree of compression to use when generating a PDF document. |
config/present/pdf/fontInfo/embed | Controls font embedding in the output document. |
config/present/pdf/scriptModel | Controls whether XFA-specific information is included in the output PDF document. |
config/present/common/data/adjustData | Controls whether the XFA application adjusts the data after merging. |
config/present/pdf/renderPolicy | Controls whether the generation of page content is done on the server or deferred to the client. |
config/present/common/locale | Specifies the default locale used in the output document. |
config/present/destination | When contained by a present element, specifies the output format. When contained by an openAction element, specifies the action to perform upon opening the document in an interactive client. |
config/present/output/type | Specifies either the type of compression to apply to a file or the type of output to produce. |
config/present/common/temp/uri | Specifies the Form URI. |
config/present/common/template/base | Supplies a base location for URIs in the form design. When this element is absent or empty, the location of the form design is used as the base. |
config/present/common/log/to | Controls the location that log data or output data is written to. |
config/present/output/to | Controls the location that log data or output data is written to. |
config/present/script/currentPage | Specifies the initial page when the document is opened. |
config/present/script/exclude | Informs Forms as a Cloud Service which events to ignore. |
config/present/pdf/linearized | Controls whether the output PDF document is linearized. |
config/present/script/runScripts | Controls which set of scripts Forms as a Cloud Service executes. |
config/present/pdf/tagged | Controls the inclusion of tags into the output PDF document. Tags, in the context of PDF, are additional information included in a document to expose the logical structure of the document. Tags assist accessibility aids and reformatting. For example, a page number may be tagged as an artifact so that a screen reader does not enunciate it in the middle of the text. Although tags make a document more useful, they also increase the size of the document and the processing time to create it. |
config/present/pdf/fontInfo/alwaysEmbed | Specifies a font that is embedded into the output document. |
config/present/pdf/fontInfo/neverEmbed | Specifies a font that must never be embedded into the output document. |
config/present/pdf/pdfa/part | Specifies the version number of the PDF/A specification that the document conforms to. |
config/present/pdf/pdfa/amd | Specifies the amendment level of the PDF/A specification. |
config/present/pdf/pdfa/conformance | Specifies the conformance level with the PDF/A specification. |
config/present/pdf/version | Specifies the version of PDF document to generate |
config/present/pdf/version/map | Specifies the fall back fonts for the document |
Add the custom XCI file to your development project.
Specify the following inline property:
{
"xciFilePath": "[path of XCI file]"
}
For example,
{
"xciFilePath": "/content/dam/formsanddocuments/customMinionProBoldAndTagged.xci"
}
Deploy the project to your Cloud Service environment.