Last active
August 25, 2020 21:13
-
-
Save BFTrick/535b611a52c3b6791996 to your computer and use it in GitHub Desktop.
A more customized Ninja Forms PDF Form Submissions template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PDF Included With Form Submission | |
* | |
* @author Patrick Rauland | |
* @version 1.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
?> | |
<html> | |
<head> | |
<link type="text/css" href="pdf.css" rel="stylesheet" /> | |
<link type="text/css" href="../../../themes/your-theme/pdf.css" /> | |
</head> | |
<body> | |
<header> | |
<img src="../../../themes/your-theme/logo.png"/> | |
</header> | |
<div id="main"> | |
<p>Hi <?php echo $fields[6]['value'];?> <?php echo $fields[23]['value'];?>!</p> | |
<p>Thanks for filling out our form. We'll respond to you shortly.</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does anybody know all of the available values that are possible or how they relate to the merge tags?
The "label" tag in this shows me label for the radio field, but with the merge tag, {field:q1:label} shows the selected radio label under options. Is it possible to grab that data on this?
Example
I have a radio select with 4 options; Fully Met, Partially Met, Not Met and N/A. Each of those options have different values. The code shows the radio value, not the radio label.
I'd like to pull that Label to the PDF vs the radio value.

Bonus points question:
Has anybody successfully pulled a calculation onto the PDF form? My PDF needs to show a calculation value from the form...it is basically a quiz that our users take and I need to report the score. The merge tag for that is {calc:scoreval}.
Many thanks in advance!