PDF Conditions

Last updated Mar 27 2019

The formTitan PDF mapping generates a document based on the data entered in your form. You create a template, either basic or dynamic, and embed the form fields in it - it's as simple as that.

The PDF template you create can also be customized by adding conditional logic to it to show/hide parts of it.
Our Pdf conditional logic includes:
1- Page condition
2- Block condition

Page conditions
When you have a multi page PDF you can use the ‘Page condition’ to show and hide pages in it based on certain conditions.
All you have to do is:
- Create a new simple form with 3 elements:
Name, phone, email,
- Create a manual PDF
- Add 2 pages to your PDF and drag the form elements on to each page.
- Click on the ‘Settings’ icon to configure the PDF
- Turn on the ‘Preview before submit’ checkbox (in the ‘General’ category)
- Open the ‘Email’ category and turn on the ‘Send to owner’ checkbox to have the pdf sent to your email address.
- Open the ‘Condition’ category and turn on the ‘Page Condition’ checkbox.
- Press on the ‘Page condition’ button
- Configure your condition, for example:
If the name contains ‘john’ then show page 2
- Turn on the ‘support opposite’ checkbox to make sure that page 2 will hide if a different value is entered in the ‘name’ field.

- Now test it:
- Publish your form as Url
- enter data in the form: John, 123456, john@test.com,
- Press on ‘submit’ and you will see 2 pages in the PDF preview that opens.
- Now press on ‘cancel’ to close the window and return to the form
- and change John to Holly
- Press on ‘submit’ and you will see only the first page in the PDF preview.

Block conditions
When you are using the Dynamic PDF mapping you can use the Block condition to show and hide selected parts of the PDF. In addition, If your PDF contains a table you can also show and hide its rows and columns by using the block condition.
All you have to do is:
- Create a new simple form with 3 elements:
Name, phone, email,
- Create a manual PDF
- Use the toggle to change to the Dynamic mode
- 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

There are 3 types of Block condition: Selection, Table column (cell) and Table row:
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’.
- Configure the condition:
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: if Name equals John
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.
- Turn on the ‘support opposite’ checkbox
- Test the PDF:
- Publish the form as URL.
- Enter John in the name field and press on submit
- The PDF preview will open and the text in the top part of the PDF will appear.
- 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.

Column - 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 cell”
- now configure the condition:
If phone field contains 1
This means that if the filler enters a phone number that has 1 in it - the email cell will show in the table.
- You will 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.
- Test the PDF:
- Publish the form as URL.
- Enter john, 12345 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.

Row - Hide/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:
If Name field is not empty
This means that if the filler enters any name then the table row will show.
- 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.
- Test the PDF:
- Publish the form as URL.
- Enter john, 12345 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.






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