Gravity form ajax is not giving any response in BlockRevealers popup

Gravity form is working with magnific popup, not working with this block revealer.
I checked default form ajax and it is working in the block revealer.
Please check 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');
    }
  });
}

}

Read more here: Gravity form ajax is not giving any response in BlockRevealers popup

Leave a Reply

Your email address will not be published. Required fields are marked *