Copy link to clipboard
Copied
Hi, is there a way to make a page show on a two page PDF if a checkbox is ticked?
I want to ask a custoemr if they are required to pay VAT.
If they aren't required to we have a VAT exempt form as page 2.
What are the steps to make it so that when they tick "yes" they are exempt from tax, the second page with the VAT exempt form shows?
Thanks.
Copy link to clipboard
Copied
You can't hide a page, but you can delete it.
To make it work, you need to create a template from second page:
Select 'Organize pages' tool, select second page (the one you wish to show/delete), on the toolbar select 'More' then 'Page templates' give it a name, like: Tax
then uncheck the little checkbox next to the name of the template to make it hidden.
Close Organize pages tool, and as 'Mouse UP' action of checkbox, use this:
if(event.target.value != "Off"){
this.getTemplate("Tax").spawn(event.target.page+1, false, false);
this.pageNum = event.target.page+1;//delete this line if you don't want to jump to template page when spawned.
}
else
this.deletePages(event.target.page+1);
If you need to rename fields on a spawned page, change first 'false' to 'true'.
Copy link to clipboard
Copied
This article explains it all in detail:
https://pdfautomationstation.substack.com/p/check-boxes-that-show-and-hide-pdf