I have a custom module with a frontend form. How is it possible to show a popup after submitting the form? Please give a solution. Any help would be appreciated.


2 Answers 2


Follow this step

  1. Submit form Using ajax
  2. on ajax success open popup
  • I have changed the form submission using ajax. But how is it possible to display the popup on ajax success.This is my script. complete: function(response) { alert("success"); jQuery.fancybox({ maxWidth : 450, maxHeight : 350, fitToView : false, width : '70%', height : '70%', autoSize : false, }); }, alert("success") is working. But popup is not loading. Please help.
    – E.B
    Commented Jul 4, 2017 at 7:34
  • edit your question and peste your code so it is visible clearly Commented Jul 4, 2017 at 11:35

You can call function onClick event of form button and in that function display/show modal using jQuery.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.