Table of Contents

How to create store switcher in UI form Magento 2

Magento allows merchants to create multiple websites, stores and store views in single installation. While creating custom CRUD operation we might need to show a store switcher in UI form to maintain different values for different stores. Today’s blog will demonstrate how we can store switcher in UI form.

First step will be to defined the store switcher in layout file. Let’s assume we have layout file named as brand_index_edit.xml and this file is located inside view/adminhtml/layout directory of module.




    
    
        
            
        
        
            
                
                    1
                
            
        
    

When you open the form you will be able to see the store switcher at top left same as product page. For any question please reach out from comment box. Happy Coding !!

Share this article f t in