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.
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:
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 asset.
|Description||All but resource||Description of the asset. 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.
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 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 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 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.
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.
Navigate to Tools > Assets > Metadata Schemas.
Click forms from the listed schema forms.
From the list that opens, click the asset type for which you want to add custom metadata.
These schemas contain metadata properties that are provided out of box and must not be altered/edited (selecting check box and clicking edit from toolbar) to avoid functional issues.
Any asset type clicked opens a list containing the
extendedmetadata option. Edit this schema.
Select the checkbox beside
extendedmetadata and then click the Edit icon that appears in the toolbar.
AEM Forms opens the metadata schema editor/form builder of the selected asset type (in this case Adaptive Form).
The left panel contains tabbed sections where the fields are placed and the right panel displays all the available UI components and the properties of the field selected from the left panel.
The locked section is not editable and contains fields for all the metadata properties that are provided out of the box.
You can add additional tabs by clicking the + symbol.
You can add a custom field of desired type by dragging the field component from the Build Form section on to the schema page.
The specifications for this field can be provided under the Settings section after clicking the field.
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 Save 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.