Appnitro Software Forums » MachForm

Dropdown Sending Email (use in two forms)

(2 posts)
  • Started 2 years ago by johntorre
  • Latest reply from johntorre

  1. johntorre
    Member

    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 2 years ago #
  2. johntorre
    Member

    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 2 years ago #

RSS feed for this topic

Reply

You must log in to post.