Formbuilder: send copy of posted mail to the submitter
Hi,
Is there a quick/simple way to send a copy of a sent form to the submitter of that form. In the backend there are only the options to send a copy to a specific mailadres and to save the mail in de db.
Onno
I think the easiest way to do is is to change the code a little bit.
Check if the replay_to field is set and than email the from.
You can replace line 445 in frontent/modules/form_builder/widgets/form.php with the following:
if (SpoonFilter::isEmail($email)) {
$replyTo = $email;
$this->item['email'][] = $email;
}
This will add the reply to email to the recipients which are looped on line 450
Just be aware that in the last line of code fragment Jacob posted, the > is actually a greater than sign. The Fork CMS forum has a little problem with html decoding in the code fragments... :-)
The last line should be: $this->item['email'][] = $email;
Thanks for the replies.
I've replace the code starting with if(arraykeyexists('reply_to',
with the code applied by Jacob. The form is sent and still works but the submitter doesn't get a copy.
Is there sometinh I'm missing?
It looks like the code isn't executed. If I echo or exit in the arrray
if(array_key_exists('reply_to', $field['settings']) && $field['settings']['reply_to'] === true)
The form is still send. In the mainsettings of Fork I've filled in the reply address.
Did you also add a textfield with validation type email and checked the field Reply to?
Thanks Jacob, I thought I had done both. Checked it again and now it works!