• We are using the modal block, with a custom element click as the trigger. Modal opens, and we have a Gravity Form inside.

    If we partially submit the form, and click submit, the modal just closes, so we don’t see the form errors. If we click the trigger button again to open the modal, we then see the errors.

    Any way we can keep this modal open, until the form has successfully submitted?

    • This topic was modified 1 year, 7 months ago by omahadev.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author merbmerb

    (@merbmerb)

    In 2.1 I added custom events e.g.

    // This is an example for the custom events, this one returns cancel=true so // modal will not close on the return

    (function($){

    $(document).on(“bod-modal-before-close”, function(e, modalData){

    $(this).data(‘cancel’, true);

    this.$modalData = $(modalData);

    // alert(“added before close”);

    });

    })(jQuery);

    You can add any code you want, so you could check form was OK and if not ‘$(this).data(‘cancel’, true);’ so the form does not close.

Viewing 1 replies (of 1 total)
  • The topic ‘Model closing too quickly’ is closed to new replies.