Peržiūrite versijai skirtą žinyno turinį:

Overview

After submitting a form, your customers generally want to keep a record, in print or in document format, of the information they have filled in the form for their future reference. This is referred to as a Document of Record (DoR).

This article explains how you can generate a DoR for non-XFA-based adaptive forms.

Pastaba:

Auto-generation of DoR is not supported for XFA-based adaptive forms. However, you can use the XDP used to create the adaptive form as DoR.

DoR is the abbreviation for Document of Record. 

Adaptive form types and their DoRs

When you create an adaptive form, you can select a form model. Your options are: 

  • Form Templates
    Lets you select an XFA template for your adaptive form. When you select an XFA template, you can use the associated XDP file for DoR as described above. 

  • XML Schema
    Lets you select an XML schema definition for your adaptive form. When you select an XML schema for your adaptive form, you can:
    • Associate an XFA template for DoR. Ensure that associated XFA template uses the same XML schema as your adaptive form
    • Automatically generate DoR
  • None
    Lets you create an adaptive form without a form model. The DoR is automatically generated for your adaptive form. 

When you select a form model, configure DoR using options available under Document of Record Template Configuration. See Document of Record Template Configuration

Automatically generated DoR

A Document of Record (DoR) lets your customers keep a copy of submitted form for printing purpose. When you automatically generate a DoR, everytime you change your form, its DoR is updated immediately. For example, you remove age field for customers who select United States of America as their country. When such customers generate a DoR, the age field is not visible to them in the DoR. 

Automatically generated DoR has the following advantages:

  • It takes care of data binding.
  • It automatically hides fields which are marked exclude from DoR at the time of submission. No extra effort is required.
  • It saves time for designing DoR template.
  • It lets you try different styling and appearance using different base templates and choose best style and appearance for Document of Record. Styling appearances are optional, and if you do not specify styling, system styles are set as default.
  • It ensures any change in form is immediately reflected in DoR.

Components to automatically generate a DoR

To generate a DoR for non-XFA adaptive forms, you need the following components:

Adaptive form

Non-XFA-based adaptive form for which you want to generate a DoR.

Base template (recommended)

XFA template (XDP file) created in AEM Designer. Base template is used to specify styling and branding information for DoR template.  

See Base template of a DoR

Pastaba:

Base template of a DoR is also called meta-template of a DoR. 

DoR template

XFA template (XDP file) generated from an adaptive form. 

See Document of Record Template Configuration

Form data

Information filled in by a user in the adaptive form. It merges with the DoR template to generate the DoR.

Mapping of adaptive form elements

The following sections describe how adaptive form elements appear in DoR.

Fields

Adaptive form component Corresponding XFA component Included by default in DoR 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 DoR template. Only Available in DoR through attachments.

Containers

Adaptive form component Corresponding XFA component Notes
Panel
Subform
Repeatable panel maps to repeatable subform.

Static components

Adaptive form component Corresponding XFA component Notes
Image Image The TextDraw and Image components, whether bound or unbound, always appear in the DoR for an XSD-based adaptive form, unless excluded using the DoR settings.
Text Text

Pastaba:

In classic UI, you get different tabs for editing field properties.

Tables

The adaptive forms table components such as header, footer, and row map to corrersponding XFA components. You can map repeatable panels to tables in DoR.  

Base template of a DoR

Base template provides styling and appearance information to document of record. It allows you to customize default look and feel of auto generated document of record. For example, you want to add your company logo in the header, and copyright information in the footer of the DoR. 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 DoR using base template for auto generation of document of record. Using base template enables you to change default properties of fields. 

Please follow Base template conventions when you design base template.

Base template conventions

A base template is used to define header, footer, styling, and appearance for a DoR. 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 DoR, which contains header, footer, page number, or any other information that should appear across all pages in the DoR.  If you are using a base template which does not conform to base template conventions, the first master page from the base template is still used in DoR 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, you should 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 given preference 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 DoR, 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 DoR. 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 AEM Designer.

  1. Click File > New.
  2. Select the Based on a template option.
  3. Select the Forms - Document of Record category.
  4. Select DoR Base Template.
  5. Click Next and provide the required information.
  6. (Optional) Modify the styling and appearance of fields that you want to apply on the fields in the DoR.
  7. Save the form.

You can now use the saved form as a base template for DoR.
Do not modify or remove any scripts present in the base template.

Modifying base template

  • If you are not applying any styling over fields in base template, it is advisable to remove those fields from base template so any upgrades to base template are automatically picked up.
  • While modifying base template, do not remove, add, or modify scripts.

Pastaba:

Design base template using conventions and strictly following the steps above.  

Document of Record Template Configuration

Configure the DoR template of your form to let your customers download a print friendly copy of the submitted form. An XDP file serves as the DoR template. The DoR customers download is formatted according to the layout specified in the XDP file. 

Perform the following steps to configure a DoR for non-XFA-based adaptive forms:

  1. In AEM author instance, click Forms > Forms and Documents. 

  2. Select a form, and click View Properties.

  3. In the Properties window, click Edit, and then click Form Model.
    You can also select a form model when you create a form. 

    Pastaba:

    In the Form Model tab, ensure that you select XML Schema or None from the Select From drop-down. DoR is not supported for XFA-based or adaptive forms with Form Template as form model.

  4. In the Document of Record Template Configuration section of the Form Model tab, select one of the following options.

    None

    Select this option if you don't want to configure DoR for the form.  

    Associate Form Template as Document of Record Template

    Select this option if you have an XDP file that you want to use as a template for the DoR. On selecting this option, all XDP files available in AEM Forms repository are displayed. Select the appropriate file.

    The selected XDP file gets associated with the adaptive form.

    Select Forms Template as base template to generate Document of Record

    Select this option to use an XDP file as a base template for defining the styling and appearance for the DoR. On selecting this option, all XDP files available in AEM Forms repository are displayed. Select the appropriate file.

    Pastaba:

    Ensure that schema used to create adaptive form and schema (data schema) of XFA Form are same if:

    • Your Adaptive form is schema based
    • You are using Associate Form Template as the Document of Record Template option for DoR

  5. Click Done.

Document of Record settings

DoR settings let you choose options you want to include in the DoR. 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 DoR. 

The DoR settings of a 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 DoR. 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 DoR 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 DoR. Applicable for panel and table only.
  • Exclude description from Document of Record: Setting the property excludes description of the panel/table from DoR. Applicable for panel and table only.

Form level settings

  • Include unbound fields in DoR: Setting the property includes unbound fields from Schema based adaptive form in DoR. By default it is true.
  • Exclude fields from DoR if hidden: Setting the property overrides the behavior of “Exclude From Document of Record” field level property when it’s not true. If fields are hidden at the time of form submission, they will be excluded from DoR if the property is set true, provided “Exclude From Document of Record” property is not set.

Key considerations when working with DoR

Keep in mind the following considerations and limitations when working on DoR for non-XFA-based adaptive forms.

  • DoR templates do not support rich text. Therefore, any rich text in the static adaptive form or in the information filled in by the end user appears as plain text in the DoR.
  • Document fragments in an adaptive form do not appear in the DoR. However, adaptive form fragments are supported. 
  • DoR is used for printing purpose only. 
  • Content binding in document of record generated for XML Schema based adaptive form is not supported.  
  • Localized version of document of record is created on demand for a locale when the user requests the rendering of the document of record. Localization of document of record occurs along with localization of adaptive form. For more information on localization of document of record and adaptive forms see Using AEM translation workflow to localize adaptive forms.

Šis darbas yra licencijuotas pagal licenciją „Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License“  „Twitter™“ ir „Facebook“ skelbimams „Creative Commons“ sąlygos netaikomos.

Teisiniai pranešimai   |   Privatumo internete politika