Support » Plugin: Contact Form 7 » Load Contact Form 7 with ajaxify

  • Hello.
    I am currently using Contact Form 7 with ajaxify.js

    It needs to load this script
    $.get(‘/wp-content/plugins/contact-form-7/includes/js/scripts.js’, function(data) { eval(data); });
    every time it loads a page with ajaxify.

    But in latest version (4.8.1) something changed and contact form doesn’t load as expected to.

    Could you please help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You don’t need to reload all the script. You just need to execute the init function.
    Try this bit of code right after the buddy press support in ajaxify.js :

    $( 'div.wpcf7 > form' ).each( function() {
        var $form = $( this );
        wpcf7.initForm( $form );
    
        if ( wpcf7.cached ) {
    	wpcf7.refill( $form );
        }
    } );

    Thank you for your support.

    First of all I am using this script to ajaxify wordpress.
    https://github.com/browserstate/ajaxify

    I replace it with your code and it works in 4.8 but not in 4.8.1
    I put your code after line 156 catch ( Exception ) { } on ajaxify-html5.js

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Load Contact Form 7 with ajaxify’ is closed to new replies.