Implementing a Modal Popup Activated by Button Click with an Embedded Data List
In the directory Vendor / Module / View / adminhtml / ui_component. Please open the 'ui_component' file where you want to add the button.
Here I will add a button to the 'banner_form.xml' form. I will input the content of the file as follows. Please skip the comment section.
And we'll get the result as follows.
Please note that in this example, I already have a Banner module and have declared the 'banner_form.xml' file previously. In this instance, we are adding content to this form when declaring it in another module.
In this example, I'll display a product list in a modal when the user clicks a button and the modal opens. In the directory Vendor/Module/view/adminhtml/ui_component, I'll create a file named product_listing2.xml
We will get the following result.