Support

Account

Home Forums Front-end Issues Front end post submit hook Reply To: Front end post submit hook

  • Alright, thanks. Sorry, it’s not yet clear yet. Let’s say I would put the next function in functions.php. Then it would send a mail every time a ACF form is saved, right?

    <?php function sendMail(){
    $to = '[email protected]';
    $subject = 'New mail';
    $headers = 'From: Themailer <[email protected]';
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $message = '<html><p>Thank you!</p></html>';
    mail($to, $subject, $message, $headers);
     }
     add_action('acf/pre_save_post', 'sendMail', 20); ?>

    How would I link this to a specific ACF form? Thanks!