Jump To Section
This filter can be used to change the inner HTML mark-up in Core and Universal templates that's wrapped around most field – section fields, page fields and the product table are not run through this filter. This mark-up is then sent to the PDF renderer. You can target different field type (like textarea, radio and select) or just modify a single field. Your changes can also be applied to all forms or some.
Just be aware that the CSS Gravity PDF ships in your templates requires this particular format. If you change it you may need to write your own custom CSS to suit. In most cases the
gfpdf_pdf_field_content filter will be more suitable.
$html | string : The formatted HTML for the current field
$value | string : The formatted user's response to the current field
$show_label | boolean : Whether you should show or hide the label
$label | string : The field label currently being processed
$field | array : The Gravity Form field currently being processed
$form | array : The current Gravity Form array
$entry | array : The raw Gravity Form Entry array.
$class | object : The Gravity PDF field wrapper class
This snippet simplifies the mark-up for most Gravity Form fields (see notes in the description above about unsupported fields):
If you wanted to restrict this to a particular Gravity Form you could use this snippet:
And if you wanted to only change the mark-up for a specific field type you could include this snippet:
Or you can remove any Hidden field types from the PDF entirely:
You can also include additional field information by using our DOM manipulation library, QueryPath. In this example we include a field's description below the label:
This filter is located in the
Helper_Abstract_Fields::html() method of