I am having difficulty with the hook frm_to_email working with the autorespond on update feature.
I would like to send an autoresponse email on update but only when the “Send Email” radio button is selected.
I tried
add_filter('frm_to_email', 'stop_the_email', 20, 3 );
function stop_the_email($emails, $values, $form_id){
if(isset($_POST['item_meta'][197]) and $_POST['item_meta'][197] != 'Send Email')
return array();
else
return $emails;
}
The autoresponse upon update sends no matter what I select in field 197.
So I tried to unselect autorespond on update in the form settings menu and added
add_action('frm_after_update_entry', 'send_email_now', 20, 2);
function send_email_now($entry_id, $form_id){
if($form_id == 7)
FrmProNotification::autopresponder($entry_id, $form_id);
}
The result was a frozen screen with no emails. What am I doing wrong here?




October 30, 2012 at 12:36 am
I found this thread .. http://formidablepro.com/help-desk/can-updated-entries-goes-to-draft-again-and-approval-mail/
Is there any work around?
October 30, 2012 at 11:15 am
We will be redoing the emailing shortly, so we don't want to add additional hooks to juggle when the emailer code is combined. So, there isn't really a way to conditionally send the auto response email.
Topic closed.