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 |
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
I do appreciate your fast response. Thanks again.
-Brian
Is there anything in the block code that I can modify to have this enabled automatically? Sorry to bother - just curious.
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);
Thanks a million. I appreciate your help!
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");
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).
Sorry, my mistake. You know what, I'm going to put something together today or tomorrow for this and then put out an update.
That is fantastic news! Thanks again.
Just curious how things with the update are going?
Oops... I've been busy, but it's getting there. Maybe within a week from now. Sorry for the delay.
- Chris
- Chris
I just hope that this is good practice considering the emails could contain sensitive information. What do you think about it?
- Chris