Support » Plugin: Gravity PDF » Change layout of Gravitywiz Nested Form

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Hey Alvin,

    Drop the following code in your active theme’s functions.php file will do the job:

    
    if ( class_exists( '\GFPDF\Helper\Fields\Field_Form' ) ) {
    	class Field_Form_Original extends \GFPDF\Helper\Fields\Field_Form {
    		public function html( $value = '', $label = true ) {
    			$_GET['gf_page'] = 'print-entry';
    			$html            = GFCommon::get_lead_field_display( $this->field, $this->get_value(), $this->entry['currency'] );
    			$html            = apply_filters( 'gform_entry_field_value', $html, $this->field, $this->entry, $this->form );
    			unset( $_GET['gf_page'] );
    
    			return \GFPDF\Helper\Helper_Abstract_Fields::html( $html );
    		}
    	}
    
    	add_filter( 'gfpdf_field_class_form', function( $class, $field, $entry ) {
    		return new Field_Form_Original( $field, $entry, GPDFAPI::get_form_class(), GPDFAPI::get_misc_class() );
    	}, 10, 3 );
    }
    
    Thread Starter intheraw

    (@intheraw)

    Hey Jake, It works! However i got a little problem. The header of each column is not not properly align. See this screenshot – https://snipboard.io/Zahexd.jpg

    Thoughts?

    Thread Starter intheraw

    (@intheraw)

    Any response would be appreciated. Thank you!

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Sorry for the delay – crazy week with Black Friday and all!

    You’ll need to inject some CSS into the template to fix up the alignment. Use the gfpdf_core_template action to do this. To figure out what CSS selector(s) to use, the ?html=1 helper parameter and your browser dev tools will make this easy.

    Thread Starter intheraw

    (@intheraw)

    It works! Thank you very much..

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Great to hear!

    Happy PDFing.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.