gravityflowpdf_file_path

The gravityflowpdf_file_path filter allows the file path to be modified.

Parameters

Parameter Type Definition
$path String Path of the PDF file
$entry_id Integer The id of the current entry
$form_id Integer The id of the current form.

Examples

Example 1 -

Returns the path of the PDF file.

The example uploads the PDF on the folder 'upload_pdf' that has already been created at the root of the site.

add_filter( 'gravityflowpdf_file_path', 'sh_gravityflowpdf_file_path', 10, 3 );
    function sh_gravityflowpdf_file_path( $path, $entry_id,$form_id ) {
		$path = $_SERVER['DOCUMENT_ROOT'].'/upload_pdf/'.$form_id.$entry_id.'.pdf';
        return $path;
    }

Placement

This code should be placed in the functions.php file of your active theme or in a custom functions plugin.