Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ops! Really sorry about posting in resolved thread. Thanks for your response anyway.

    I have created a new topic here.

    Apologies.

    Just a bit more information. I have tried to add other hook, in order to check if everything is fine.

    And the other hook worked… see:

    add_action( 'vfb_confirmation', 'vfb_action_confirmation', 10, 2 );
    
    function vfb_action_confirmation( $form_id, $entry_id ){
    	?>
    		<script type="text/javascript">alert('Hello vfb_confirmation');</script>
     	<?php
    }
    
    add_action( 'vfb_override_email_5', 'vfb_action_override_email', 10, 5);
    
    function vfb_action_override_email( $emails_to, $form_subject, $message, $headers, $attachments ){
        ?>
     	<script type="text/javascript">alert('Hellow override');</script>
    
        <?php
        // Checks radio button. Use Merge Tag to easily get $_POST id
        $emails_to = array( $_POST['vfb-87'], '[email protected]' );
            // Send the mail
        foreach ( $emails_to as $email ) {
            wp_mail( $email, $form_subject, $message, $headers, $attachments );
        }
    }

    After submitting the form I saw “Hello vfb_confirmation”, but nothing about the override stuff.

    Thanks in advance.

    Hi all,

    first of all say congratulations for you awesome plugin.

    One question, I am trying to use the vfb_override_email_ hook, but I do not know why, but it does not work.

    In the email setting’s form I have introduced my email, and when I submit the form I receive it, That is perfect.

    But the plugin ignores the hook.

    I am using the PageLines as a theme’s provider.

    What am I missing? Do I need to do an extra configuration??

    Thanks in advance.

    That is my code (and the form id is 5).

    /*
    // ====================================================
    // = YOUR FUNCTIONS - Where you should add your code  =
    // ====================================================
    */
    
    add_action( 'vfb_override_email_5', 'vfb_action_override_email',  10, 5);
    
    function vfb_action_override_email( $emails_to, $form_subject, $message, $headers, $attachments ){
        alert('Hook working 5');
        // Checks radio button. Use Merge Tag to easily get $_POST id
        $emails_to = array( $_POST['vfb-87'], '[email protected]' );
            // Send the mail
        foreach ( $emails_to as $email ) {
            wp_mail( $email, $form_subject, $message, $headers, $attachments );
        }
    }
Viewing 3 replies - 1 through 3 (of 3 total)