Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi,

    I have made changes to contact-form-7-pdf-extension.php file on plugin root within function send_conf7_attachment_file()

    `function send_conf7_attachment_file($cf7){

    //check if this is the right form ID………….
    ……..
    …….
    endforeach;

    /********editing file name***********/
    $formdata = get_post($cf7->id);
    $slug = $formdata->post_title;
    // library for genrating the pdf file
    require(‘pdflib/html2fpdf.php’);
    …….
    …….
    $pdf->Output("wp-content/uploads/".$slug.".pdf");
    ……….
    ………
    // $pdf_filename with the extenstion not just the filename
    $pdf_filename = $slug.”.pdf”;
    ………………..
    ……………..
    }

    This will change file name form.pdf to your contact-form-title.pdf (to avoid failure add – (hyphens) instead of space in form name)

    • This reply was modified 7 years, 5 months ago by nisharana.
Viewing 1 replies (of 1 total)