This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Email Logic


  1. finger123
    Member

    I notice that when creating a email logic, it will only email when first filing out the form. I have a form that asks certain questions and asks for approval from a manager. When a user fills out the form, it gets submitted to the manager. When the manager reviews the form, he edits the form and has a choice of either approving or denying the request. With that said, the logic I have created is supposed to email the user whom filled out the form with the information of what the manger either approved or deny. The logic doesn't work this way. Only seems to work if they initially approve the form from the get go. Any way around this?

    Posted 11 years ago #
  2. yuniar

    That is the expected behavior indeed.

    If you need the logic to be triggered when the form is being updated from within MachForm panel as well, you can try editing your "includes/post-functions.php" file. Search around line 2589 for this code:

    //send all notifications triggered by email-logic
    if(($is_inserted && !empty($logic_email_enable) && empty($form_review) && ($form_page_total == 1) && empty($edit_id)
    && ($delay_notifications === false) ) || ($is_inserted && !empty($logic_email_enable) && $is_committed &&
    empty($edit_id) && ($delay_notifications === false) )

    change it to become:

    //send all notifications triggered by email-logic
    if(($is_inserted && !empty($logic_email_enable) && empty($form_review) && ($form_page_total == 1)
    && ($delay_notifications === false) ) || ($is_inserted && !empty($logic_email_enable) && $is_committed &&
    ($delay_notifications === false) )

    MachForm Founder

    Posted 11 years ago #
  3. finger123
    Member

    after making your changes, this is the error I get.

    Fatal error: Class 'Swift_SmtpTransport' not found in /home2/thegeeks/public_html/application/includes/helper-functions.php on line 879

    Posted 11 years ago #
  4. TM
    Member

    Was this resolved? I wanted to use the above code if it is error-free.

    Posted 11 years ago #
  5. TM
    Member

    I tired it and get this error: Fatal error: Class 'Swift_MailTransport' not found in /home/virtualv/public_html/reg/includes/helper-functions.php on line 890

    Posted 11 years ago #
  6. yuniar

    Try to edit the "edit_entry.php" file. Search around line 23 for this code:

    require('includes/users-functions.php');

    exactly below that line, add this code:

    require('lib/swift-mailer/swift_required.php');

    MachForm Founder

    Posted 11 years ago #
  7. wilsonp
    Member

    Hi,

    I have tried this and it makes no difference when I change an entry. No email is sent when a checkbox, that uses logic to email a person, is changed to ticked using edit.

    Anything else that would need modifying?

    Thanks.

    Posted 11 years ago #

RSS feed for this topic

Reply