Form Data

Permalink Browser Info Environment
Just purchased this block and it is working great! However, the owner of the site I have implemented on is asking if there is a way to have the actual form data sent in a confirmation email once a user fills out the form. Currently, he receives an email once someone has successfully completed payment. Is there a way to have the values entered/returned in the form itself sent in this confirmation email so that he doesn't have to go to the dashboard right away to see what some of the data might be? Thanks!

Type: Discussion
Status: New
bwolken
View Replies:
phatworks replied on at Permalink Reply
phatworks
No, not currently. I think I was concerned about security so I didn't include that feature. Perhaps I could make it an option to "Include form data in the confirmation email you send to me".

I just hope that this is good practice considering the emails could contain sensitive information. What do you think about it?

- Chris
bwolken replied on at Permalink Reply
bwolken
If the feature could be implemented, that would be very helpful. I think that the situation regarding sensitivity of information being sent is really a judgement call on the part of the web designer -- depending on what type of information is being requested in the form. In my case, I am utilizing this block as a means for people to select and then pay for registration for CPR Classes. The owner of the site would really like to see the class that was selected by the user come across in the confirmation email.

I do appreciate your fast response. Thanks again.

-Brian
bwolken replied on at Permalink Reply
bwolken
Is there anything in the block code that I can modify to have this enabled automatically? Sorry to bother - just curious.
phatworks replied on at Permalink Reply
phatworks
Yep, swap out line #195 (should start with $message...) of ipn_listener.php in the blocks folder with these two lines:

$message = str_replace(array('[Cardholder Name]','[Amount]','[Currency]','[cardholder name]','[amount]','[currency]','[CARDHOLDER NAME]','[AMOUNT]','[CURRENCY]'), array($first_name.' '.$last_name,$mc_gross,$_POST['mc_currency'],$first_name.' '.$last_name,$mc_gross,$_POST['mc_currency'],$first_name.' '.$last_name,$mc_gross,$_POST['mc_currency']), $fresu['confirmationEmailBody']);
$message = str_replace(array('\r', '\n'), array("\r", "\n"), $message);
bwolken replied on at Permalink Reply
bwolken
Thanks a million. I appreciate your help!
bwolken replied on at Permalink Reply
bwolken
Actually, now the confirmation email is no longer being sent. Here is what I have for lines 195, 196, and 197 now.

$message = str_replace(array('[Cardholder Name]','[Amount]','[Currency]','[cardholder name]','[amount]','[currency]','[CARDHOLDER NAME]','[AMOUNT]','[CURRENCY]'), array($first_name.' '.$last_name,$mc_gross,$_POST['mc_currency'],$first_name.' '.$last_name,$mc_gross,$_POST['mc_currency'],$first_name.' '.$last_name,$mc_gross,$_POST['mc_currency']), $fresu['confirmationEmailBody']);
               $message = str_replace(array('\r', '\n'), array("\r", "\n"), $message);
               mail($fresu['recipientEmail'], "Form Submission and Payment", $message, "From: Forms.With.PayPal.Payment@no-reply.com");
bwolken replied on at Permalink Reply
bwolken
The code that you posted looks like it is the same code from the confirmation email section. When I replace that, it just sends the same information that it would send to the customer to confirm their payment. I was hoping to have a copy of ALL form data sent to the form creator (or specified address).
phatworks replied on at Permalink Reply
phatworks
Sorry, my mistake. You know what, I'm going to put something together today or tomorrow for this and then put out an update.
bwolken replied on at Permalink Reply
bwolken
That is fantastic news! Thanks again.
bwolken replied on at Permalink Reply
bwolken
Just curious how things with the update are going?
phatworks replied on at Permalink Reply
phatworks
Oops... I've been busy, but it's getting there. Maybe within a week from now. Sorry for the delay.

- Chris

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.