frm_pdfs export content not working

By: Carlos Ossa | Asked: 11/30/2022
ForumsCategory: Code Snippetsfrm_pdfs export content not working
Carlos Ossa asked 1 year ago
frm_pdfs_export_content doesn't work.   I use the frm_pdfs_export_content hook but I don't know why it doesn't work.   I have tried to use this example but there is no result   add_filter( 'frm_pdfs_export_content', 'add_extra_content', 10, 2); function add_extra_content( $content, $args ) { $entry_id = '<p>Entry ID: #' . $args['entry']->id . '</p>'; return $entry_id . $content; }   Also, use this example as a test. Of course I changed the ID to the one of my form but without result   add_filter( 'frm_pdfs_export_content', 'add_title_and_description_to_pdf', 10, 2 ); function add_title_and_description_to_pdf( $content, $args ) { $target_form_id = 385; // Change 385 to the ID of your form $form_id = (int) $args['entry']->form_id; if ( $target_form_id !== $form_id ) { return $content; } $form = FrmForm::getOne( $form_id ); return '<p>' . esc_html( $form->name ) . '</p><p>' . esc_html( $form->description ) . '</p>' . $content; }   Please some help. Thanks.  
Question Tags:
1 Answers
Victor Font answered 1 year ago
Where are you putting the code and have you changed $target_form_id?
Carlos Ossa replied 1 year ago

Hello, I appreciate your help. At this point I checked again and it works now 😊. I don't know exactly why it didn't work the first time.

Thanks.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right