• Resolved Issivan

    (@issivan)


    Hello gays,
    I have a problem with the code on_sent_ok: “SPU.show(2269);”. Contact form give me a error.
    The on_sent_ok and on_submit settings are deprecated and scheduled to be abolished by the end of 2017.

    Someone has the same problem or can help me? I would like to find a easy alternative code.

    • This topic was modified 7 years, 5 months ago by Issivan.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Damian

    (@timersys)

    More info on https://contactform7.com/2017/06/07/on-sent-ok-is-deprecated/

    
    add_action( 'wp_footer', 'mycustom_wp_footer' );
     
    function mycustom_wp_footer() {
    ?>
    <script type="text/javascript">
    document.addEventListener( 'wpcf7mailsent', function( event ) {
       SPU.show(2269);
    }, false );
    </script>
    <?php
    }

    If you like the plugin / support please leave a short review. It’s a tremendous help for us!

    Thanks

    Thread Starter Issivan

    (@issivan)

    Thanks Damian for the reply but doesn’t works.When a customer fill the form doesn’t appear the popup.

    I have in the functions.php file these code. It is correct?
    I have to fix the problem asap.

    <?php
    function listify_child_styles() {
    wp_enqueue_style( ‘listify-child’, get_stylesheet_uri() );
    }
    add_action( ‘wp_enqueue_scripts’, ‘listify_child_styles’, 999 );

    function listify_custom_remove_url_slugs() {
    add_filter( ‘submit_job_form_prefix_post_name_with_company’, ‘__return_false’ );
    add_filter( ‘submit_job_form_prefix_post_name_with_location’, ‘__return_false’ );
    add_filter( ‘submit_job_form_prefix_post_name_with_job_type’, ‘__return_false’ );
    add_filter( ‘submit_job_form_prefix_post_name_with_job_region’, ‘__return_false’ );

    }
    add_action( ‘after_setup_theme’, ‘listify_custom_remove_url_slugs’ );

    /**Code fix problem ok sent contact*/
    add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );

    function mycustom_wp_footer() {
    ?>
    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    SPU.show(2269);
    }, false );
    </script>
    <?php
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ERROR: on_sent_ok Is Deprecated’ is closed to new replies.