Core Booster Plugin Documentation: How to Install and Configure
Core Booster is a premium plugin for Gravity PDF that adds a number of new settings to control the look and feel of Core and Universal templates. Core templates are the free designs that ship with Gravity PDF Core. Universal templates are the premium designs available for purchase from the Template Shop.
You can purchase the Core Booster plugin from the Extension Shop. This guide will walk you through installing and configuring Core Booster to its full potential.
This documentation refers to version 2 of the Gravity PDF Core Booster add-on. The v1 documentation can be found here.
Installation
Please follow our installation guide, which provides instructions for uploading the add-on to your WordPress website and adding your license key for automatic updates.
Configuring
Once the plugin is activated, you'll find new settings in the Template section when you create or edit a PDF configured with a Core or Universal template. The following section details what each setting does: Refer to the sections below for information on what each setting does:
- Page Margin
- Introduction (Custom Content)
- Filter Fields
- Field Label Display
- Field Choices
- Field Choices Layout
- Field Choices Display
- Image Choices Display
- Image Choices Size
- Field Description
- Pricing Fields
- Entry Notes
Page Margins
Adjust the gap between the page edge and the main content area. The page margin format follows the CSS shorthand convention, allowing you to specify the margin for each side of the page.
The CSS shorthand rules are:
- If one value (e.g.
10mm
or1in
), it is used for all four sides - If two values (e.g.
10mm 5mm
or1in 0.5in
), the first is used on top and bottom margins, and the second for the left and right. - If three values (e.g.
10mm 5mm 20mm
or1in 0.5in 1.5in
), the first is the top margin, the second is the left and right, and the third the bottom. - If four values (e.g.
10mm 5mm 20mm 15mm
or1in 0.5in 1.5in 0.7in
), the first is the top, the second the right, the third the bottom, and fourth the left.
When defining a margin, the following units are supported:
- Millimeters:
mm
- Centimeters:
cm
- Inches:
in
- Percentage:
%
- Pixels:
px
If you prefer, you may use a different unit for each side e.g. 10mm 0.5in 1% 30px
The top/bottom margins are automatically increased if you include a header or footer that would overlap the main body content with the margin you have chosen.
Introduction (Custom Content)
When enabled, this setting allows you to add rich text or images at the very start of the PDF document (after the header but before the form title / fields are displayed). Merge tags and shortcodes are supported.
If you only want to display the Introduction content in the PDF, you can:
- Disable the Show Form Title setting
- Enable the Filter Fields setting and leave all fields in the Excluded list
- Set the Pricing Fields setting to the Remove Fields option
The Introduction setting is available in Core Booster v2.2+.
Filter Fields
When enabled, you can control exactly which fields are included in the PDF, and the order those fields are displayed (from v2.1). This allows you to configure multiple PDFs on the same form, with different fields in each document.
Fields you add to the Included list will be displayed in the PDF using the order selected. You may reordered fields in this list using drag and drop, or by holding left shift on the keyboard and using the up/down arrow keys.
If you'd like to control which HTML fields are included in a PDF, first enable the Show HTML Fields setting. To filter pricing fields, set the Pricing Fields setting to Display Individually (it's not possible to filter these fields in the summary table). To filter Page Break fields in the PDF enable the Show Page Names setting.
The rudimentary "exclude" CSS class is ignored when this setting is enabled.
When Filter Fields is disabled (the default), all form fields will be displayed in the PDF (unless another setting excludes specific fields e.g. Enable Conditional Logic).
Field Label Display
This setting allows you to control what label will be displayed for fields in the PDF. You have four choices available:
- Field Label: All fields will use the value set in the Field Label setting, which is found under a field's General section in the Form Editor.
- Admin Label: All fields will use the value set in the Admin Field Label setting, which is found under a field's Advanced section in the Form Editor.
- Admin Label (if not empty): If it has been set, a field's Admin Field Label will be display. Otherwise, the standard Field Label is used.
- No Label: This option disables all field labels in the PDF, and only the field value is included.
Field Choices
By default, Gravity PDF only displays the user-selected choices for Radio, Checkbox, Select, and Multiselect fields in Core and Universal templates. When enabled, this setting will display all available field choices for specific fields, and check the choices a user has selected when they completed the form.
If a user has selected a choice, it will show up as a crossed ballot box ☒. If it has not been selected an empty ballot box is displayed ☐.
All choices are shown in a list/block format by default, but you can use the Field Choices Layout setting to display them inline. You can override this setting for individual fields by adding show_all_options
or hide_all_options
to the Custom CSS Class setting (under the Advanced section) in the Form Editor.
If you display Pricing Fields individually, those that support choices are compatible with this feature.
If making use of Gravity Wiz's Populate Anything perk, your Live Merge Tags are correctly processed and displayed in the PDF when included in choice labels/values.
Field Choices Layout
This setting controls how all the field choices will be presented in the PDF. You can choose to display each choice on a new line (Block), or include them side-by-side (Inline).
When using the Block layout, and a field isn't included in a Drag and Drop column (or using Formium, Colossus, or Cellulose templates), you can also display choices in a 2 to 5 column list. This may produce a more uniform layout than the Inline setting.
You can override this setting for individual fields by adding gf_list_inline
or gf_list_block
to the Custom CSS Class setting (under the Advanced section) in the Form Editor.
Field Choices Display
Gravity PDF defaults to displaying the choices label for Radio, Checkbox, Select, and Multiselect fields. This setting allows you to display the choice value instead.
If you'd like relevant pricing fields to use the choice value, you need to set the Pricing Fields setting to Display Individually.
Image Choices Display
If your form has them configured, you have the option to display image choices for both Gravity Forms Image Choice field and the JetSloth Image Choices add-on.
Available display options include:
- Image and Label
- Image and Value
- Image only
- Label only
- Value only
The image size is controlled by the Image Choices Size PDF setting.
The Field Choices setting fully supports PDF Field Choices, so you can display all available image choices in the PDF using a block or inline layout.
If using JetSloth Image Choices with Pricing fields, the Product and Option field images will be shown in both the PDF Product table and when shown individually in the PDF.
The Image Choices Display setting is available in Core Booster v2.2+.
Image Choices Size
If you form has them configured, you have the option to control the size of image choices for both Gravity Forms Image Choice field and the JetSloth Image Choices add-on.
Available display options include:
- Small: 150px wide
- Medium: 200px wide
- Large: 300px wide
When choices are displayed inline, small images are displayed in a four-column layout, medium images in three columns, and large in two columns.
The Image Choices Size setting is available in Core Booster v2.2+.
Field Description
When enabled, each field Description (found under the General section in the Form Editor) will be displayed alongside the label and value. The description position is determined by your Form Settings, and can be placed above or below the user's response in the PDF.
Pricing Fields
Pricing fields are all fields shown under the Pricing Fields section in the Form Editor. This includes Product, Option, Quantity, and Shipping field types.
In the PDF, the default layout for Pricing fields is to group them together at the end of the document in a Summary/Order table – similar to how they are displayed on Entry Details. This setting allows you to alter this behaviour and display all Pricing fields individually, in the order they appear in the Form Editor. When shown individually, pricing fields can be affected by the Filter Fields and Field Choices settings.
For convenience, the Remove Fields option is an easy shortcut to remove all Pricing fields from the PDF.
Entry Notes
Every entry has a notes section to keep important, related information with each submission. When this feature is enabled, your Gravity PDF Core or Universal template will include these notes at the end of the document.
Nested Forms
Core Booster 2.1+ has three layout options available for the display of a Gravity Wiz Nested Forms field:
You may override this setting for individual Nested Forms fields by adding gpdf_nested_standard
, gpdf_nested_table
, or gpdf_nested_transposed
to the Custom CSS Class field setting in the Form Editor.
Standard
Gravity PDF will display all Nested Forms fields for each entry, provided each entry/field combination passes the various settings configured for the PDF eg. Show HTML Fields, Enable Conditional Logic, Show Empty Fields to name a few.
When you enable the Filter Fields setting, only the child fields you select will be shown in the PDF. The field order chosen in Filter Fields will be respected.
Table
Nested Forms entry data will be displayed in a table layout in the PDF. By default, the table columns used are the Nested Forms Summary Fields chosen in the Form Editor (minus the Row ID). Each row in the table is an individual entry.
When you enable the Filter Fields setting, the child fields you select will be used in the table columns (instead of the Summary Fields). The field order chosen in Filter Fields will be respected when the table is created.
If your Summary Fields/Filter Fields setting includes a large number of Nested Forms fields, there may be display issues in the PDF when using this layout option.
Table (transposed)
Like the Table layout, but with the rows and columns reversed. This format is useful when you've set a low Maximum Entry Limit on your Nested Forms field.
If you do not limit the maximum number of entries – no greater than 5 is a good rule of thumb – there may be display issues in the PDF when using this layout option.
Additional CSS
The Additional CSS editor allows you to tweak the design and layout of your PDF using CSS. This is a power user feature, and if you are not careful you could cause display issues.
For convenience, CSS for common layout adjustments have been included in the editor. To activate one of these snippets, remove the opening /*
and closing */
comment tags from around the CSS.
To help you write your CSS, you can use the HTML URL parameter while viewing a PDF. Use your browser development tools to view the source code. Only a subset of CSS is supported by the PDF engine being used.
Translations
The Core Booster plugin supports the following languages out of the box:
- English
- French
- Spanish
- German
- Chinese
- Dutch
- Portuguese
- Russian
If you'd like to translate the plugin into your own language, or change an existing translations, you can follow this How To Guide. Note: the text domain for Core Booster is gravity-pdf-core-booster
.
All translations have been generated with AI / machine learning. If a translation is incorrect, please submit a ticket and let us know (select Other for the enquiry type).
Upgrade from v1
Provided you are running Gravity PDF (Core) 6.0 or higher, you'll have a seamless upgrade experience to Core Booster v2. Besides the new features, the important changes include:
- The minimum support version of Gravity PDF has been increased to 6.0 or higher.
- The labels/descriptions for existing settings have been updated to better reflect what they do. This is purely presentational, and doesn't change how those features work in your PDFs.
- The
gf_inline_list
CSS class is now natively supported when the current field is displaying all field choices. If you'd like to continue showing your choices inline in your form, but as a list in the PDF, you can add an additional CSS classgf_inline_block
to the field. - To support all the features available in Core Booster v2, your Universal PDF templates need to be manually upgraded to v3.0+ via the PDF Template Manager.
Developers
Hooks
These hooks are available for developers to further customize the extension:
- gfpdf_description_spacer
- gfpdf_form_field_selector_sort_enabled
- gfpdf_image_choice_intermediate_size
- gfpdf_image_choice_width
Custom Templates
You can take advantage of the Core Booster PDF settings in your custom template by doing the following:
- In the Header section of your custom template, include the
core-booster-supported
tag. If you already have tags in your template, add a comma and then the tag (the position in the list doesn't matter).
<?php
/**
* Template Name: My Custom Template
* Version: 0.1
* Description: A custom template that makes use of the Core Booster settings
* Group: Dunder Mifflin Paper Co.
* Required PDF Version: 6.0
* Tags: core-booster-supported
*/
- Your custom template must call
$pdf->process_html_structure()
at some point in the file:
<?php
/*
* Load our core-specific styles from our PDF settings which will be passed to the PDF template $config array
*/
$show_form_title = ( $settings['show_form_title'] ?? '' ) === 'Yes';
$show_page_names = ( $settings['show_page_names'] ?? '' ) === 'Yes';
$show_html = ( $settings['show_html'] ?? '' ) === 'Yes';
$show_section_content = ( $settings['show_section_content'] ?? '' ) === 'Yes';
$enable_conditional = ( $settings['enable_conditional'] ?? '' ) === 'Yes';
$show_empty = ( $settings['show_empty'] ?? '' ) === 'Yes';
/**
* Set up our configuration array to control what is and is not shown in the generated PDF
*
* @var array
*/
$html_config = [
'settings' => $settings,
'meta' => [
'echo' => true, /* whether to output the HTML or return it */
'exclude' => true, /* whether we should exclude fields with a CSS value of 'exclude'. Default to true */
'empty' => $show_empty, /* whether to show empty fields or not. Default is false */
'conditional' => $enable_conditional, /* whether we should skip fields hidden with conditional logic. Default to true. */
'show_title' => $show_form_title, /* whether we should show the form title. Default to true */
'section_content' => $show_section_content, /* whether we should include a section breaks content. Default to false */
'page_names' => $show_page_names, /* whether we should show the form's page names. Default to false */
'html_field' => $show_html, /* whether we should show the form's html fields. Default to false */
'individual_products' => false, /* Whether to show individual fields in the entry. Default to false - they are grouped together at the end of the form */
'enable_css_ready_classes' => true, /* Whether to enable or disable Gravity Forms CSS Ready Class support in your PDF */
],
];
/*
* Generate our HTML markup
*
* You can access Gravity PDFs common functions and classes through our API wrapper class "GPDFAPI"
*/
$pdf = GPDFAPI::get_pdf_class();
$pdf->process_html_structure( $entry, GPDFAPI::get_pdf_class( 'model' ), $html_config );