PDF Form Submissions

The PDF add-on needs to be installed and activated to see the features mentioned in this this documentation.

Automatically send a PDF copy of the form submission via email

To attach a PDF to your form submission to any email, click the Emails & Actions tab of your form builder and select the email action you want to attach the PDF to. Expand the Advanced settings of the email action, and flip the ATTACH PDF toggle switch to green.

A PDF copy of the form submission will now be sent as an attachment on this email.

Manually export any form submission as a PDF

To manually export any form submission as a PDF, navigate to Ninja Forms > Submissions and select the form you wish to export from. Hover over the individual submission you need an export of, and select Export to PDF.

Customizing the PDF

Customizing the PDF requires the addition of code either as an edit placed in your child theme’s functions.php file, or as a custom plugin. While these changes are outside the scope of support that we will be able to help you with, some commonly requested changes are provided below.

See custom modification tips

Add sequential numbering to the PDF files

add_filter( 'ninja_forms_submission_pdf_fetch_sequential_number', '__return_true' );

Add the submission date to the PDF file

add_filter( 'ninja_forms_submission_pdf_fetch_date', '__return_true' );

Change the default PDF name

function custom_pdf_name( $name, $sub_id ) { 
     $name = 'my-awesome-contact-form' . $sub_id; 
     return $name; 
add_filter( 'ninja_forms_submission_pdf_name', 'custom_pdf_name', 20, 2 );

Modifying the PDF Template

This plugin includes a templating system so you can customize the PDF template. Any customizations to the PDF template are not supported with the product license.  For more information on customizing the PDF template,  click here.

Copy the ‘wp-content/plugins/ninja-forms-pdf-submissions/templates/pdf.php’ file to ‘wp-content/your-theme/ninja-forms-pdf-submissions/pdf.php’.

You can modify this HTML to make any adjustments you like.

The document root is set to ‘wp-content/plugins/ninja-forms-pdf-submissions/include/’ so if you want to include a stylesheet or image from your theme you’d have to do it like this:

‘<link type=”text/css” href=”../../../themes/twentytwelve/css/test.css” rel=”stylesheet” />’