Convert Form Submission to PDF; then email to site owner

Permalink
Hi,

I'm using the built-in Concrete5 Form plugin, and would like to add a few features.

I'd like to convert the Form submission into a PDF, then email it, but I'm really lost on how to do this.

Any help would greatly be appreciated.

Thanks!

 
andrewjaff replied on at Permalink Reply
andrewjaff
Hi,
You can convert form submission to PDF. just override the core form block controller function
called "action_submit_form".

Copy this function from core form controller and paste it to roo/blocks/form/controller.php

convert form submission to PDF and attached with mail.


-Andrew
infinitezero replied on at Permalink Reply
Great! I'll try this and post the results here!

Thanks!
infinitezero replied on at Permalink Reply
Hi Andrew,

Thanks again for the help, but I'm still getting stuck. I'm still new to Concrete5 and MVC in general, so thanks for your patience. Here's what I understand.

I tracked down the form module I'm using here:

/concrete/core/controllers/blocks/


and looked for the
action_submit_form
function, as you instructed. From what I understand, I'll copy this *code* — not the file — into
root/blocks/form/controller.php
. Since the folder
/form/
didn't exist I created it, and added the
controller.php
file.

But I'm confused by how to convert the form submission to PDF. This isn't a built-in function in Concrete5 is it? Do I have to install something like FPDF?

Again, thanks in advance for your help and any help you can provide!

Cheers!
andrewjaff replied on at Permalink Reply
andrewjaff
Hi,
I am not sure c5 has default function or not, but you can use HTML to PDF library to create pdf. if you have core knowledge.

keep your controller class name should be same as core form block controller class.