Export form entries as PDF in your WordPress forms. It allows the option to attach a PDF export of the entry that can be attached to the email.
There are several ways to export entries as a PDF:
Download and install
- If you haven't already done so, install and activate Formidable Forms Pro.
- In your WordPress admin, go to Formidable → Add-Ons and click the Install button for the WordPress PDFs plugin.
Export entry as PDF
If you want to export a specific entry as a PDF, follow the instructions below.
- Go to your form Entries page.
- Select the View or Edit link below the selected entry that will take you to the entry details page.
- In the admin sidebar under the Entry Actions section, select the Download as PDF link.
Attach PDF of entry to email
If you want to attach a PDF export of the submitted entry to the email notification, follow the instructions below.
- Go to your form Settings → Actions & Notifications page.
- Click on the Email Notification action to edit it, or click the Send Email icon to add a new email notification.
- Scroll down and toggle the Attach PDF of entry to email option.
Alternatively, for a more customized PDF, you can use the frm-pdf shortcode (see below) inside the email content.
Insert the shortcode manually
You may insert the following shortcode on a page, post, email notification, or View to show an expiring link to the entry's PDF export.
Replace x with the ID of the entry you want to display. The entry ID is found on the entry details page.
- id: Change the entry ID that holds the value you want to retrieve. When using the shortcode in Email content, On submit message or View content, the current entry ID will be automatically used.
- label: By default, the label is shown as Download PDF. If the label is set to empty (label="") or 0 (label=0), the shortcode will display the URL.
[frm-pdf id=x label="Click to download entry as PDF"]
- title: Change the PDF link HTML title attribute. If this is empty, the label attribute will be used.
[frm-pdf id=x title="Entry PDF link"]
- mode: Change how the PDF file is delivered after clicking the link. Set the mode using either mode=view, or mode=download. The default mode is view, where the PDF file content is shown in the browser. Use download as the value to automatically download the PDF file.
[frm-pdf id=x mode="download"]
- include_fields: Only include specific fields in the PDF file content.
[frm-pdf id=x include_fields="10,15"]
- exclude_fields: Exclude specific fields in the PDF file content.
[frm-pdf id=x exclude_fields="10,15"]
- include_extras: By default, page breaks and section headings are used in the shortcode. If admin_only is used , the PDF file will include all fields that are invisible to the current user.
[frm-pdf id=x include_extras="page, section, html, admin_only"]
- class: Apply a Formidable Style or your CSS class to the PDF link. If no class is specified, the default Formidable style is used.
[frm-pdf id=x class="class_name_here"]
- html_id: Change the PDF link HTML id attribute. This identifier must be unique across the page.
[frm-pdf id=x html_id="entrypdf"]
- target: Change the PDF link HTML target attribute. Use target="_blank" to open the PDF link in a new browser tab.
[frm-pdf id=x target="_blank"]
- public: The default value is empty. If the value is set to "0" or empty, only logged-in users who create the entry or have the frm_view_entries capability can view the PDF file.
[frm-pdf id=x public="0"]
If the value is set to "1" or a non-empty value, any user with the link can view the PDF file.
[frm-pdf id=x public="1"]
Related developer hooks
- Include the form title and description in the exported PDF file with the frm_pdfs_export_content hook.
- Add extra content in the exported PDF file with the frm_pdfs_export_content hook.
- Filter the fields used for the exported PDF entry content with the frm_pdfs_fields_for_export hook.
- Filter the PDF entry export file name with the frm_pdfs_export_file_name hook.
- Filter the CSS of the PDF entry export with the frm_pdfs_css hook.
- Filter the default atts of the [frm-pdf] shortcode with the frm_pdfs_default_shortcode_atts hook.
- Filter the output of the [frm-pdf] shortcode with the frm_pdfs_shortcode_output hook.
- Filter the download URL of the [frm-pdf] shortcode with the frm_pdfs_download_url hook.
- Filter the args of FrmProEntriesController::show_entry_shortcode(), which is used in the content of the PDF entry export file with the frm_pdfs_show_args hook.
- Filter the maximum days an access code can expire with the frm_pdfs_access_code_max_days hook.
- Filter the args of the DOMPDF constructor with the frm_pdfs_dompdf_args hook.