Gravity PDF
Gravity Forms PDF Extended - templates (inserting fields) (2 posts)

  1. phirefly
    Posted 3 years ago #

    Firstly, thanks for what appears to be an awesome plugin!

    I'm not a developer but am usually pretty good at figuring things out. I'm just a little stuck on inserting fields into the template.

    eg. in the example template Country is: <?php echo $address_country; ?>

    How do I know it is "address_country"?

    When I look at: http://www.yourdomain.com/?gf_pdf=print-entry&fid=1&lid=1&notes=1&template=example-template.php

    I see: [country] => United Kingdom

    Guidance &/or examples would be appreciated.

    Many Thanks

    PS. I've looked through the pdf-print-entry.pdf & cannot see anything that needs edited; am I missing something?


  2. Jake Jackson
    Plugin Author

    Posted 3 years ago #

    Hi Phirefly,

    There is an explanation on custom templates found here: http://gravityformspdfextended.com/documentation/2.0.0/9/advanced-configuration/

    As for how you know it is 'address_country', it's not. You manually set those variables using the $form_data array.

    If you review example-template.php you'll see lines like this:

    $email = $form_data['field']['email'];

    pdf-print-entry.php is the default template and doesn't need modifying. Example-template.php is the file you want to look at for custom templates.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity PDF
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic