• Resolved sixtyseven

    (@sixtyseven)


    Hi from germany,

    I’d like to put some dynamic data in the pdf regarding the values of the form fields. Is there any hook/filter I could use do get my own data into the pdf? Maybe via a shortcode or a function?

    Thanks for help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sixtyseven

    (@sixtyseven)

    In the front.action.php on Line 283 I found this part:

    $html = $msg_body;
    $html = nl2br($html);

    Perfect would be something like

    $html = $msg_body;
    $html = apply_filters( 'cf7_pdf_message_body', $html, $wpcf, $submission );
    $html = nl2br($html);

    By this simple addition I could write something like ###my_replace### in the PDF Message body and replace it on the fly with data that I can get from the form submission. In my particiular case I want to calculate something by two values of transmitted form fields and print out different text bits regarding that calculation.

    Does that make sense to you? If so, thanks for considering my suggestion.

    Plugin Author ZealousWeb

    (@zealopensource)

    HI @sixtyseven

    Thanks for you comment and suggestion.
    We have added filter as you defined and tested, you can use it and attach your custom content into PDF.

    Thanks,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Own shortcodes in the generated PDF’ is closed to new replies.