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;
}
}