• Is there a way to close a PopUp with a click on a Gravity Forms submit button?

    e.g. is there a class, perhaps, that can be added to the submit button to do this?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mpmchugh

    (@mpmchugh)

    Alternatively, I’ve also tried just using a custom [CLOSE] button as part of the Gravity Forms confirmation message, but it does not work using either the “close” class or even “evr-close”.

    e.g.
    <a class="close et_pb_contact_submit et_pb_button" href="#close">CLOSE</a>

    This works if I just have it in the pop-up in the Divi builder as a test, but if it’s loaded as part of the Gravity Forms confirmation message after the form is submitted, it does not work. Clicking it does nothing.

    Why would that be not working?

    • This reply was modified 3 years, 6 months ago by mpmchugh.
    • This reply was modified 3 years, 6 months ago by mpmchugh.
    Thread Starter mpmchugh

    (@mpmchugh)

    I managed to get this to work by placing this button and script as part of the confirmation message itself.

    <a class="close et_pb_contact_submit et_pb_button" href="javascript:void(0);">CLOSE</a>
    
    <script>
    jQuery(document).on('click', '.popup a.close', function() {
    DiviArea.hide();
    return true;
    });
    </script>

    The script would not work from the head of the page, oddly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Close Popup on Gravity Form Submit’ is closed to new replies.