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

    (@nabil_kadimi)

    After reading the code I was able to find the solution:

    function my_plugin_wpcf7_properties( $properties, $contact_form_obj /* unused */ ){
        $properties[ 'additional_settings' ] .= "\n" . 'on_sent_ok: "console.log(1);"' . "\n";
        return $properties;
    }
    add_filter( 'wpcf7_contact_form_properties', 'my_plugin_wpcf7_properties' ), 10, 2 );

    Explanation here: http://www.kadimi.com/en/wpcf7-javascript-programmatically

Viewing 1 replies (of 1 total)
  • The topic ‘How to add a handler or many for on_sent_ok from within a plugin’ is closed to new replies.