In this guide, we will explain how to use the advanced templating option for hiding repeat group empty entries along with other text/data.
The following guide covers the basics of displaying repeat group entries in PDF templates - https://support.formyoula.com/knowledgebase/articles/1181851-display-repeat-group-entries-in-custom-pdf-templat
We have a custom table created by the Repeat group entries in the PDF template.
Please "Enable Advanced Templating", under the PDF Page Settings on the PDF editor.
In the PDF editor source code, we will use the #if block to check the repeat group data.
<!-- {{#if 879f-f484-fcb7}} -->
And will use the closing tag /if of the #if block after the text.
<p>This is system Generated Data.</p>
<!-- {{/if}} -->
Please use the below example code and update the PDF editor source code:
<!-- {{#if 879f-f484-fcb7}} -->
<table align="left" border="1" cellpadding="1" cellspacing="0" style="width:100%;">
<thead>
<tr>
<th><strong>Name</strong></th>
<th><strong>Adress</strong></th>
<th><strong>Phone</strong></th>
<th>Account ID</th>
<th>Occupation</th>
</tr>
</thead>
<!-- {{formyoula_repeat_879f-f484-fcb7}} -->
<tbody>
<tr>
<td>{{f974-818e-45dd}}</td>
<td>{{67e7-09b2-b4ca}}</td>
<td>{{0edc-7f48-8850}}</td>
<td>{{674c-f521-a77a}}</td>
<td>{{6cac-c05a-e8d1}}</td>
</tr>
</tbody>
<!-- {{formyoula_repeat_879f-f484-fcb7}} -->
</table>
<p>* Note </p>
<p>This is system Generated Data.</p>
<!-- {{/if}} -->
Note: Use the closing tag as per the requirements. It will check the repeat group data and if there is no data, then will hide/remove the extra text under the #if block.
Save the PDF changes and try the form.
For any questions, please contact us - [email protected] or the Formyoula in-app chat :)