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, 11 months ago by
mpmchugh.
-
This reply was modified 3 years, 11 months ago by
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.