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
How to send a Copy of the form
Started 17 years ago by zentering | 11 posts |
-
Hi, all!
I would like the form to send a copy of the form to the sender. Any suggestions?
/ M
Posted 17 years ago # -
Hi there!
At this moment, there is no built-in feature to do this yet.
However, with a bit of customization, we could do this.Here's how to do it.
1) Get the email field name which you want the email being sent to. View source on your HTML form code. In this example, my email field name is element_32) Edit includes/helper-functions.php. Around line 454, you'll find this code:
$mail->Send(); $mail->ClearAddresses();
Now, right under those code, add this code:
if(function_exists("form{$form_id}_hook_email")){ $carbon_email = call_user_func("form{$form_id}_hook_email",$table_data); if(!empty($carbon_email)){ $mail->AddAddress($carbon_email); $mail->Send(); } }
3) Edit hooks/custom_hooks.php. Add this code inside of it:
function formXXX_hook_email($user_input){ $field_name = 'element_3'; if(!empty($user_input[$field_name])){ return $user_input[$field_name]; }else { return true; } }
Change the XXX with your form_id number and element_3 with your field name.That's it.
If those are too difficult for you, please paste me the link to your form. I'll put up the code for you.
MachForm Founder
Posted 17 years ago # -
WOW what a service, yes please i would like you to do it. My friend that has some skills is on holyday.
http://www.nsph.se/index.php?aid=340
Best regards / Z
Posted 17 years ago # -
Ok, I've just checked your form. Your email input name is element_6
Now, what you need to do is to paste the code as I wrote on step 2 above.
For step no 3, use the code below:
function form1_hook_email($user_input){ $field_name = 'element_6'; if(!empty($user_input[$field_name])){ return $user_input[$field_name]; }else { return true; } }
I hope I'm being clear for you.If this still sounds too difficult, then mail me your FTP login information (send it to customer.service [at] appnitro.com). I'll update your files.
MachForm Founder
Posted 17 years ago # -
ok, one challenge...
i would like, mix "send a copy (carbon)" with some "html" to 2 user (elemnt_1 and elemnet_2)
how can i do this possible?
Posted 16 years ago # -
Hmm..let me clarify this.
So each user would receive one email only? which contain a mix of your form copy + some html?
What kind of html?
MachForm Founder
Posted 16 years ago # -
Yes, i would like to do this: each user will recive one email only, (the form information entrie with a header gif (html)).
Posted 16 years ago # -
Forget it, i get it, thank you anyway. :-)
Posted 16 years ago # -
how did you get it?
Posted 16 years ago # -
Hi Yuniar
I'd like your help with this - I've just sent an email to you with the FTP info.
Thanks
Nick :)
Posted 16 years ago # -
nick -- done :)
MachForm Founder
Posted 16 years ago #
Reply
You must log in to post.