Manage form metadata
Metadata allows for easier categorization and organization of assets and helps users who are looking for a specific asset.
AEM Forms, by default, provides a defined set of metadata for each asset type. Beyond the default metadata, you can add custom metadata to each of the asset types. AEM Forms also provides you with the right means of creating, managing, and exchanging all this metadata efficiently for your forms.
If you're a developer or a site owner, you can customize Forms Portal, the end-user interface for AEM Forms to reflect the metadata you're using in your organization. For more information abouts Forms Portal, see Introduction to publishing forms on a portal .
Metadata in AEM Forms
In AEM Forms, the list of metadata properties associated with an asset depends on its type. Also, if you add any custom metadata property, it is added across all the assets of the type on which the custom metadata was added.
The following asset types are supported in AEM Forms:
- Form templates (XFA forms)
- PDF forms
- Document (flat PDFs)
- Adaptive forms
Extensive list of metadata
The following is an extensive list of metadata properties supported in AEM Forms:
|Property name||Asset type||Description|
|Title||All but resource||Display name of the form.|
|Description||All but resource||Description of the form. The user can specify this value.|
A read-only value specifying the type of asset. It can have one of the following values:
|Created||All||A read-only value specifying the time of asset creation.|
|Last modification date||All||A read-only value specifying the time when the asset was last modified.|
|Author||All but resource|
A read-only value that is automatically computed based on the form type.
|Status||All but resource|
A read-only value that defines one of the following states of a form:
|Last publish date||All but resource||A read-only value specifying the time when form was last published.|
|Publish on/off time||All but resource|
Time at which the form is scheduled to be automatically published/unpublished. The user sets this value on editing metadata.
To configure a user-specified URL for submitting form data to a servlet.
Submit URL can be configured using any of the following methods, listed in order of precedence:
|HTML render profile||Form template||The HTML render profile used while rendering a Form Template in HTML format.|
This option allows the user to specify the rendering format of the form when the forms are published:
This option is used for restricting the rendering format of the forms only on forms portal where they are visible to the end user.
|Tags||All but resource||Labels associated to the form to facilitate quick and easy search.|
List of assets (other forms or resources) that this form is related to. These assets can fall in following two categories:
These assets are displayed as links and their metadata can be accessed directly by clicking them.
|Form model (XDP/XSD) selection||Adaptive form|
Specifies which form model is used while authoring the adaptive form. This property can have following values:
A form model once selected can be updated but not removed.
View form metadata
Assets have existing property values, which can be viewed in read-only mode. This metadata is originated at the time of form upload or form creation.
- Navigate to the location of the asset for which you want to view metadata.
- Open the properties page using one of the following ways:
- Click the View Properties icon from Quick Actions.Quick Actions are the action items that get displayed over a thumbnail on mouse hover.
- Select the form and click the View Properties icon that appears in the toolbar.
- Navigate to the form details page by clicking the form thumbnail when not in the selection mode. Now, click the eye icon on the upper right, and then click Properties in the list beneath it.
- The property page that opens displays a schema containing only those metadata properties that hold some value.The properties page has a toolbar containing two action icons:
The content portion is divided in two parts:
- Edit: Edit the metadata property values
- View: Navigate to the form details page, which opens the form in the preview mode.
- Left panel contains thumbnail of the form
- Right panel contains metadata properties in the read-only mode, distributed across various tabs.
Add/update form metadata values
You can edit the value of existing metadata properties or add new values to an existing metadata property field (for example, when a metadata field is blank).
Update metadata property values
- Follow the steps mentioned in the previous section to open the properties page where existing metadata of the selected form can be viewed.
- From the toolbar, click the edit icon to change the mode of the page from read-only to read/write.
- The properties page that opens holds a schema that contains a mix of editable input fields and static text.
- The properties displayed in static text are the ones that you cannot edit.
- You can navigate to other tabs to find input fields for metadata properties placed under them.This page has a toolbar containing two action icons different from those in view mode:
Both these actions direct the user back to read-only mode of the properties page containing the updated values.
- Cancel: Cancel any changes made to metadata property values so far
- Done: Save all the changes made to metadata property values so far
Update the form thumbnail
The left panel in the properties page displays the thumbnail of the form. By default, the thumbnail displayed is the one generated at the time of form creation (adaptive form) or at the time of form upload.
For all form types, you have the option to upload an image by clicking Upload Image and browsing for an image file from the local directory. The selected image is used as a thumbnail instead of the default one.
For adaptive forms, additional functionality is provided, which allows the user to generate a thumbnail as a snapshot of the current adaptive form preview. Since AEM Forms also supports authoring of adaptive forms, the preview of the adaptive form may change every time you change the adaptive form. This functionality to generate a thumbnail helps you obtain a fresh thumbnail for the adaptive form based on the current preview status. Click Generate Preview to carry out this action.
- Use a square image for the thumbnail. When you use a non-square image and view the thumbnail in list view, the thumbnail appears clipped.
- Once a new image is uploaded or generated, the thumbnail is replaced by this image and cannot be reset to the previous image.
Add custom metadata
Apart from the metadata provided out of the box, AEM Forms supports new custom metadata.
A tool (Metadata Schema Editor) is provided to define the schema for the metadata layout; that is, the layout of what appears in the Properties page of a form. The Metadata Schema Editor lets you add or modify a custom schema for your assets.
AEM Forms exposes the metadata schemas of the supported forms types in this tool. This way, you can access these schemas and use the functionality provided in metadata schema editor to add custom properties.
Add custom metadata property in schema editor
- Navigate to the tab (existing or new) where you want to add the custom property.
- Drag a component of desired type from the Build Form section to left panel and place at a convenient location.You cannot move the locked sections, but you can place your component in any of the empty spaces.
- Click a component that you just dragged. In the Settings tab that opens in the right panel, fill in information for the following fields:
- Specify a Field Label which will be used as a display name above the field placed in schema (For example: Department)
- Under Map to property field, you can see a prefilled value './jcr:content/metadata/default' . Change the ‘ default ’ to a desired property name, which is used to store the property in crx repository (For example: './jcr:content/metadata/department')Do not change the prefix ‘./jcr:content/metadata/’ as it defines the path where the property is stored.Also, the property name must be unique to avoid writing values for two or more properties at the same location in repository. So, it is recommended that you change the value 'default'.
- Fill other settings based on requirement. For example: select the Required option if you want to make the field mandatory.
- To delete a field you added, select the field and then click the delete icon.
- If necessary, follow steps 1-3 to add another property.
- Click **Done **after making all the changes.You have successfully added a custom metadata property.
All the adaptive forms in AEM Forms now contain this additional metadata property. You can edit it from the properties page.