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
Dropdown Sending Email (use in two forms)
Started 15 years ago by johntorre | 2 posts |
-
Hi Redityo and Yuniar, i just want to ask if how to add this or use this sending email from dropdown to other form.
Like with your example form18 and element_3 what if im going to use this to
FORM 19 element_12?Thanks in advance!
function form18_hook_email($params){ //change the email addresses below $email_list[1] = 'sales@example.com'; $email_list[2] = 'hrd@example.com'; $email_list[3] = 'support@example.com'; $email_list[4] = 'accounts@example.com'; $email_list[5] = 'legal@example.org'; $res = do_query("select element_3 from ap_form_{$params['form_id']} where id='{$params['entry_id']}'"); $row = do_fetch_result($res); $attn = $row['element_3']; $target_email = $email_list[$attn]; if(!empty($target_email)){ return $target_email; }else { return true; } }
Posted 15 years ago # -
already solved... i figured it out that if you want to work this you have to add email address in email notification field... just dont leave it blank..
More power MachFORM!!!
Posted 15 years ago #
Reply
You must log in to post.