Modal containing a form closes on form submit before the success message loads

Description: I am using a modal window to load a ninjaform and its corresponding success message. Here is the page: https://payxps.com/learn-even-more/

Desired User Experience: Modal stays open until the user clicks outside the modal content area or clicks the close button.

Current User Experience: Modal closes as soon as the form is submitted so the user sees no success message.

The form gates video content that is delivered with the success message, so this breaks that process as the user does not get the content they registered for.

This was working perfectly but recently broke and I can’t figure out how to fix it.

Updated to add: modal window closes onclick of submit button even if form is empty / doesn’t submit.

Hello Jim,

Thanks for writing in! I have inspected your page and there is a JS error on the page that may have affected the modal element. The error displays like this:

Uncaught TypeError: $ is not a function
    at (index):541
    at (index):555

Please double-check any custom JS code that you have added to the site. Make sure that the JS code is valid and correct. You may need to contact the creator of JS code for further assistance.

Kindly let us know how it goes.

Hi @ruenel,

Thank you for your response! I’ve gone through the site and there’s no custom JS code on the page. The only script that was employed globally was google tag manager. I disabled that temporarily and observed the same behavior.

I’ve also gone through and disabled all plug-ins checking for conflicts and have found nothing. Any chance this is a byproduct of the wordpress 5.7 rollout? All my themes and plugins have been updated but I have not updated wordpress yet.

Thanks again!

Also, this just started last night. Modal toggles render fine on live site but in the builder they now look like this:

Hello @bbm,

It might be the issue of custom CSS or plugin conflict issue because of that the modal is not working properly in the backend. I would suggest you troubleshoot with a few of the common issues before we investigate your settings.

  1. Testing for Plugin Conflict
  2. CSS/JS Customization
  3. Version Compatibility
  4. Disabling Cache

If none of those work, please send your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin level username and password
  • Exact Page URL

You can find the Secure Note button at the bottom of your posts

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.