• Resolved pastichedesign

    (@pastichedesign)


    Hi,

    I am using Boxzilla with a MC4WP form shortcode. All is working OK but is it possible to auto close the box and overlay after the submit in the form is clicked rather than the user having to click the close button.

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Contributor Lap

    (@lapzor)

    It’s not officially possible, but you can do it with some custom Javascript code.

    First you would need to make sure the MC4WP form submitted without errors, by listening to the subscribed event:

    https://www.mc4wp.com/kb/javascript-form-events/

    and then you have to close the Boxzilla box:
    https://kb.boxzillaplugin.com/showing-boxes-manually/

    <script type="text/javascript">
    mc4wp.forms.on('subscribed', function(form, data, updated) {
    Boxzilla.dismiss(5);
    })
    </script>

    The example above assumes the Boxzilla box ID nr 5.

    Hope that helps. If you have any questions, please let me know!

Viewing 1 replies (of 1 total)
  • The topic ‘Auto close after MC4WP submit’ is closed to new replies.