WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Maintenance Mode] How To Display Contact Form 7 On Maintenance Page? (12 posts)

  1. war59312
    Member
    Posted 4 years ago #

    Hi,

    Any chance Contact Form 7, http://contactform7.com/, can be used on the maintenance page?

    I have it showing up just fine, but the ajax does not work so the form is not usable.

    Thanks,

    Will

    http://wordpress.org/extend/plugins/wp-maintenance-mode/

  2. war59312
    Member
    Posted 3 years ago #

    Any ideas?

  3. Frank
    Member
    Posted 3 years ago #

    Please test this:
    add <?php wp_head(); ?> to the site.php of the plugin, before </head>.

    Dosnt work, add also <?php wp_footer(); ?> before </body>.
    please give me a feddback, maybe i wil include this.

  4. war59312
    Member
    Posted 3 years ago #

    Nice. OK so now displays at least.

    I had to add

    <?php echo do_shortcode( '[contact-form 1 "Contact form 1"]' ); ?>

    in the body too.

    See: http://www.war59312.com/

    But none of the ajax works, and no email is ever sent even after filling out the forum correctly.

    Making progress. Thank you.

  5. war59312
    Member
    Posted 3 years ago #

    Hi,

    Sadly no difference with WP Maintenance Mode version 1.6.5. either.

    Any other ideas?

    Thanks again,

    Will

  6. Frank
    Member
    Posted 3 years ago #

    Please check verion 1.6.6 and use the shortcode inside the text of the options of WP Maintenance Mode to include the form.

  7. divydovy
    Member
    Posted 3 years ago #

    Hi Frank,

    I'm afraid it doesn't work with v1.6.6 either. I've tried adding wp_head and wp_footer to site.php too - this gets the AJAX submission working, but the ajax loading gif just stays on and no email is ever generated. I *think* it's something to do with the form action - Firebug tells me that on form submission, the root URL for the site returns a 503 Service Temporarily Unavailable header. Adding the form's action URL (e.g. /#wpcf-435-fdsa ) to your wp-maintenance-mode.php file's exclusion list doesn't work, but does stop the 503.

    Hair being pulled out. Thanks for making a neat plugin.

    Cheers,

    divydovy

  8. Frank
    Member
    Posted 3 years ago #

    THANKS.
    But this was my idea from the plugin, dont use on frontend functions from WP - an problem. Maybe i include an own form, but is not so flexibal how CF7 o other :(

  9. divydovy
    Member
    Posted 3 years ago #

    Hi Frank,

    Thanks for your response. Yes, I agree, your plugin does exactly what it should do.

    After struggling yesterday with working out a solution, I had an epiphany last night and came up with this workaround.

    Basically, just set up a standalone WP install and create a very simple single page on that install (with contact form), then switch between the two sites to emulate the maintenance mode effect. Obviously this won't work for everyone, but I wish I'd thought of it yesterday morning ;)

    Thanks Frank

  10. war59312
    Member
    Posted 3 years ago #

    Frank, sadly no difference with version 1.6.6 .

    divydovy, the 503 is line 692 in wp-maintenance-mode.php

    So when you click the submit button it just reloads the page as "text/html" instead of getting a "application/json" response.

    When I load my real working contact page the last request is "?_wpcf7_is_ajax_call=1&_wpcf7=1" of type "application/json".

    That request is never made on the maintenance mode page.

    Update: OK whoops that request is made but its dead wrong. It requests it as "text/html" and it just the html of the page not the ajex data.

    So yeah ajax is still failing completely even after adding the header and footer calls.

  11. jittipat
    Member
    Posted 3 years ago #

    Thanks,
    Touch Webdesign

  12. divydovy
    Member
    Posted 3 years ago #

    Hi war59312,

    Thanks so much for taking the investigation further. Fingers crossed someone can figure this out!

    divydovy

Topic Closed

This topic has been closed to new replies.

About this Topic