This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Custom body copy for email notification
Started 16 years ago by xlawdog | 3 posts |
-
Is there any way to add a sentence or two of body copy above the list of form labels / values in the notification email?
This would have to be customized and different for each form.
Posted 16 years ago # -
The easiest way to do this would be editing your includes/helper-functions.php.
On line 412, you will find this block of code:
$email_body = ''; $i=1; foreach ($email_data as $data){ $email_body .= "{$i}) <b>{$data['label']}</b> {$data['value']} "; $i++; }
As you can see, the $email_body is initialized with an empty string. All we need to do is to initialize that variable with your own custom text for each form.The code should be something like this:
if($form_id == 1){ $email_body = 'Hello this is form 1'; }elseif($form_id == 2){ $email_body = 'Hello this is form 2'; }else{ $email_body = ''; } $i=1; foreach ($email_data as $data){ $email_body .= "{$i}) <b>{$data['label']}</b> {$data['value']} "; $i++; }
Simply adjust the text for each form_id and you should be all set.MachForm Founder
Posted 16 years ago # -
Beautiful! Thank you.
Posted 16 years ago #
Reply
You must log in to post.