Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter yurka94

    (@yurka94)

    Ok .I’ve just do that saying in my-functions.php.txt . I have put this file in plugin directory and activate it . And I’ve left one function :

    add_action(‘cforms2_after_processing_action’, function ($cformsdata) {

    `### Extract Data
    ### Note: $cformsdata[‘id’] = ” (empty) for the first form!

    $formID = $cformsdata[‘id’];
    $form = $cformsdata[‘data’];

    ### triggers on your third form
    if ( $formID == ‘3’ ) {

    ### Do something with the data or not, up to you
    $form[‘Your Name’] = ‘Mr./Mrs. ‘.$form[‘Your Name’];

    }

    ### Send to 3d party or do something else.
    ### You can throw an Exception. Its message is printed on the screen.
    if (!wp_mail(‘you@example.com’, ‘cforms my_action test’, print_r($form,1), ‘From: you@example.com’))
    throw new Exception(‘Mail could not be sent’);

    But warning still appears . Have I done something wrong ?

Viewing 1 replies (of 1 total)