PDF Block condition

Last updated Oct 01 2018

The 'Block condition' is a conditional logic that can be used to show and hide selected parts of the PDF. This option can only ne used in the Dynamic PDF mode.
The block condition can allow you to set  3 types of conditions:
- Selection - to show selected parts in the PDF
- Table Col - to show a table column
- Table Row - to show a table row

Following is a step-by-step example that will walk you through all 3 types of block condition.
All you have to do is:
- Create a new simple form
- Drag 3 elements: 2 textboxes an an email feld


- Select each field on canvas and go to the 'Properties' panel > 'Element' tab > 'Settings' option > 'Basic' category > Label
- Change their label names to: Name, phone and email.


- Create a manual PDF:
- Go to 'Properties' panel > 'Form' tab > 'Settings' option > Press "view more" link > 'PDF Mapping' category.
- Press on the "Map fields" button and the PDF editor will then open.
- Use the toggle to change to the Dynamic mode


- Press on the "Settings" icon in the Toolbar and turn on the "Preview before submit" checkbox (in the General category).


- Add some text, like :
Hello and add the “name field” right after it. So it will now say: Hello name,


Add some more text under that, like: Welcome to my dynamic pdf
- Add a table with 3 columns (toolbar > insert > table)


- Click inside the first column and open a sub menu with a right mouse click


- Select Insert and choose the ‘Name’ field - it will then be inserted into the column


- Move to the second column and insert the ‘Phone’ field into it.
- Move to the third column and insert the ‘email’ field into it.


At this point in our example you can create 3 different types of Block conditions: 
Selection, Table Row, Table Col.
So following is an example for each type:

Selection - Hide/show selected part of the PDF
- Select the text you added at the top  (“Hello name,...)
- right click to open the sub menu
- Select ‘Condition’ and then ‘Selection’.


- Now a window will open for you to configure the condition:
Please note that this is a very basic conditional window where the result is always the same and if the condition is met, then the selected item/s will show.

- Now Set the following condition: Name equals John and press "apply".
This means that if john will be entered in the name field - the text you selected will appear.


- You will notice that the selected area is now confined within an “If Block” box.
Clicking on the ‘If block’ title tag will open the condition window for edit.


- Press 'Apply' and save the form.
- Test the PDF:
- Publish the form as URL.
- Enter the form: John in the 'name' field, 1234 in the 'phone' field and 'john@test.com' in the email field. 
- press on submit
- The PDF preview will open and the text in the top part of the PDF will appear (because the condition was met).


- Now press cancel and change the name to Jill. Open the preview again and you will not see the text at the beginning of the PDF.



Table Col - Hide/show table column
- Click inside the third column (with the email in it).
- Right click to open your sub menu.
- Select ‘condition’ and then “table col”.


- Now configure the condition:

phone contains 1
This means that if the filler enters a phone number that contains the digit 1 in it - the email cell will show in the PDF table.
- Press 'Apply'. 


- You will now notice that the selected column content is now confined within an “If Block” box.

Clicking on the ‘If block’ title tag will allow you to edit or remove the condition.


-Press 'Apply' and save the form.
- Test the PDF:
- Publish the form as URL.
- Enter john, 1234 and john@test.com
- Press on submit
- The PDF preview will then open and the table will show all 3 columns
- Now press ‘cancel’ and remove the digit 1 in the phone number. Open the PDF preview again and you will not see the third column (with the email).




Table RowHide/show table row
- Click inside the second column (with the phone in it)
- Right click to open your sub menu
- Select ‘condition’ and then “table Row”


- Now configure the condition:
Name is not empty
This means that if the filler enters any name then the table row will show.
- Press 'Apply'.


- You will also notice that the selected row content is now confined within an “If Block” box.
Clicking on the ‘If block’ title tag will allow you to edit or remove the condition.
- Press 'Apply' and save form.


- Test the PDF:
- Publish the form as URL.
- Enter john, 1234 and john@test.com



- Press on submit
- The PDF preview will then open and the table row will appear.
- Now press ‘cancel’ and remove the value from the Name field
-  Click submit again and you will not see the table row.


** This feature was suggested to us by Shlomi Shifman - thanks  for your great ideas!

CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.