Working example
The following is a sample implementation of a custom template where Forms Portal acquires a custom Geometrixx Gov Card Layout for the Search & Lister component.
<div class="__FP_boxes-container __FP_single-color">
<div class="boxes __FP_boxes __FP_single-color" data-repeatable="true">
<div class="__FP_boxes-thumbnail">
<img src ="${path}/jcr:content/renditions/cq5dam.thumbnail.319.319.png"/>
</div>
<h3 class="__FP_single-color" title="${name}" tabindex="0">${name}</h3>
<p>${description}</p>
<div class="boxes-icon-cont __FP_boxes-icon-cont">
<div class="op-dow">
<a href="${formUrl}" target="_blank" class="__FP_button ${htmlStyle}" title="${config-htmlLinkText}">${localize-Apply}</a>
<a href="${pdfUrl}" class="__FP_button ${pdfStyle}" title="${config-pdfLinkText}">${localize-Download}</a>
</div>
</div>
</div>
</div>
Technical specifications for custom templates
A custom template for any Forms Portal component includes repeatable and non-repeatable entries. Repeatable entries are basic entities for listing. Examples of repeatable entries are Search & Lister, Drafts & Submissions, and Link components.
Forms Portal provides a syntax for place-holders to display custom/out-of-the-box metadata. The placeholders are populated after displaying the results of forms, drafts, or submissions.
To include a repeatable entry, configure the value of the attribute data-repeatable to true.
In the example discussed, two Div elements are present at the top in the custom template. The first, with “__FP_boxes-container” CSS class, works as a container element for the forms that are listed. The second, with “__FP_boxes” CSS class, is a template for the basic entities, in this case a Form. The data-repeatable attribute present in the Div element has the value true.
Each placeholder has an exclusive out-of-the-box metadata set. To display custom metadata at a particular place on the form, add the ${metadata_prop} property at the place.
In the example, the metadata property is used at multiple instances. For example, it is used in description, name, formUrl, htmlStyle, pdfUrl, pdfStyle, and path in the prescribed manner.