I’m using the solution listed here: https://wordpress.org/support/topic/convert-form-output-to-pdf-attachment to create a pdf using form data with fpdf and contact form 7 on a WordPress build.
Does anyone know how to attach the pdf to one particular form?
This solution works great but it seems to attach the pdf to all contact 7 forms. Is there a way to have it only attach to a specific form for those of us that have multiple forms on one site. Maybe by form id?
Thanks,
Have solved it. Used the following variable and if statement.
$id = $contact_form->id();
if ($id==16) where 16 equals the id of the contact 7 form
There’s probably more efficient solutions but I’m not proficient in PHP.