How to set up a form popup-modal in Magento 2 November 23, 2015 - Fire development, Magento 2 To set up a form popup-modal in Magento 2, use Magento_Ui/js/modal/modal widget as follows: require([ 'jquery', 'jquery/ui', 'Magento_Ui/js/modal/modal' ], function($){ $('<div />').html('Modal Window Content') .modal({ title: 'My Title', autoOpen: true, closed: function () { // on close }, buttons: [{ text: 'Confirm', attr: { 'data-action': 'confirm' }, 'class': 'action-primary', click: clickCallback }] }); }); 12345678910111213141516171819202122 require([ 'jquery', 'jquery/ui', 'Magento_Ui/js/modal/modal'], function($){ $('<div />').html('Modal Window Content') .modal({ title: 'My Title', autoOpen: true, closed: function () { // on close }, buttons: [{ text: 'Confirm', attr: { 'data-action': 'confirm' }, 'class': 'action-primary', click: clickCallback }] });}); Source (Stackexchange Question)(KAndy) More tips from the Cookbook Related postsHow to generate order increment IDs automatically during Magento 2 importHow to update products that are not listed in a product table during Magento 2 importHow to Import Customers & Customer Addresses to Magento 2Amasty ChatGPT AI Content Generator for Magento 2Magento 2 B2B Company Guide: Revealing Company Structure & ImportCopyAI Review 2023Magento 2 Release NotesAdobe (Magento 2) Commerce and Cloud (Enterprise Edition) Specific Features Post Tags:form popup-modalmagento 2Magento 2 Developer’s Cookbook Homepage » Fire development » How to set up a form popup-modal in Magento 2 Please enable JavaScript to view the comments powered by Disqus. ← Previous Post Next Post →