Skip to content

Instantly share code, notes, and snippets.

@wpmudev-sls
Last active September 18, 2024 06:22
Show Gist options
  • Save wpmudev-sls/5582e249dc0cd4a7bd36732b2179708a to your computer and use it in GitHub Desktop.
Save wpmudev-sls/5582e249dc0cd4a7bd36732b2179708a to your computer and use it in GitHub Desktop.
[Forminator Pro] - Display group fields inline inside the PDF
<?php
/**
* Plugin Name: [Forminator Pro] Group field display inline inside the PDF
* Description: Group field display inline inside the PDF.
* Author: Prashant @ WPMUDEV
* Task: SLS-6457
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_filter(
'forminator_pdf_basic_template_markup',
function ( $html, $pdf_settings, $form_id, $entry_id ) {
if ( 2960 !== intval( $form_id ) ) { // Please change 2960 to your form ID.
return $html;
}
$html = str_replace( '</b><br />', '</b> ', $html );
return $html;
},
10,
4
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment