Gravity form is functioning properly with magnific popup, but encountering issues with this block revealer. I have verified that the default form ajax works within the block revealer. Kindly review the HTML and JS code.
Block Revealer used - Block Revealer
HTML
<button id="event-rental-form-trigger" class="btn btn-primary" title="Click Me">Click Me</button>
<div id="event-rental-modal" class="modal">
<span id="event-rental-modal-close" class="i-close event-rental-modal-close"></span>
<div class="form-block caps">
<h2 class="text-center pad-bottom-sm">Event Rental Request</h2>
<?php echo do_shortcode('[gravityform id=1 title=false description=false ajax=true]'); ?>
</div><!-- .form-block -->
</div><!-- .modal -->
JS
if ($('#event-rental-modal').length) {
var eventRentalModalEl = document.querySelector('#event-rental-modal'),
eventRentalModalRevealer = new RevealFx(eventRentalModalEl),
//deleteCtrl = modalEl.querySelector('#newsletter-form-trigger'),
eventRentalModalCloseCtrl = eventRentalModalEl.querySelector('#event-rental-modal-close');
document.querySelector('#event-rental-form-trigger').addEventListener('click', function () {
eventRentalModalEl.classList.add('modal--open');
$('#site-wrapper').addClass('js-overlay');
eventRentalModalRevealer.reveal({
bgcolor: '#393E46',
direction: 'tb',
duration: 400,
easing: 'easeOutCirc',
onCover: function (contentEl, revealerEl) {
contentEl.style.opacity = 1;
},
onComplete: function () {
eventRentalModalCloseCtrl.addEventListener('click', closeEventRentalModal);
}
});
});
function closeEventRentalModal(ev) {
eventRentalModalCloseCtrl.removeEventListener('click', closeEventRentalModal);
$('#site-wrapper').removeClass('js-overlay');
eventRentalModalEl.classList.remove('modal--open');
eventRentalModalRevealer.reveal({
bgcolor: ev.target.classList.contains('event-rental-modal-close') ? '#393E46' : '#FFB823',
direction: 'bt',
duration: ev.target.classList.contains('even-rental-modal-close') ? 200 : 400,
easing: 'easeOutCirc',
onCover: function (contentEl, revealerEl) {
contentEl.style.opacity = 0;
},
onComplete: function () {
modalEl.classList.remove('modal--open');
}
});
}
}