Entry ID in frm_success_filter

By: Dániel Horváth | Asked: 01/04/2024
ForumsCategory: Code SnippetsEntry ID in frm_success_filter
Dániel Horváth asked 7 months ago
Hey!   I'm trying to create PDF-s based on a form submission data in the frm_success_filter, then instead of the standard confirmation message i send back to link to the created PDF.   My main problem is, that i'm not sure how can i get the created entry's ID (this should be also shown on the PDF), since frm_success_filter only gets the $type and $form variables, and these don't contain this information. Currently I'm using
global $frm_vars;
$entry_id = $frm_vars['created_entries']["1"]["entry_id"];   where 1 is the ID of the Form, but i'm not sure if this can be safely used, because if multiple submissions are created the same time for this form, the ID might be overwritten. Is there a safe way to do this, or maybe i should use another filter to do this?   Thank you!
1 Answers
Victor Font answered 7 months ago
I'm not sure why you think you have to use the filter, The confirmation action allows you to attach an entry as PDF just by activating a toggle switch. Do you have the PDF add-on installed?

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