Show/Hide fields on PDF based on condition
Richard avatar
Written by Richard
Updated over a week ago

Please find below steps to SHOW/HIDE fields on the PDF:

1. Go to the PDF Editor and open the Page Settings.

2. Enable the “Enable Advance Templating” option.

3. Copy the Merge Field Id of the component whose condition needs to be checked.  

4. Below is the code format with a sample code to execute the conditional show/hide.

Use Case:

To change Yes and No value of checkbox to some other value like if a user want to display for example x in place of yes and y in place of No.

PDF SourceCode:

<!--{{#if b56d-b886-8f59}}  -->
<p>x</p>
<!-- {{else}} -->
<p>y</p>
<!-- {{/if}} -->

Note : 

  1. b56d-b886-8f59 => Component ID of checkbox field

  2. <!--      -- >  use this to remove white space/special character issues.

  3. Make sure you are using this code in PDF editor source else it might add additional spaces or characters which break the syntax.

End result:

Did this answer your question?