Magento – Add category input to widget.xml adminmagento2widget How to add this to my custom widget at backend? Best Answer You need to create a category chooser for the Magento Admin Panel: Backend configurations: <field id="multi_category_chooser" translate="label" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Categories</label> <frontend_model>[Vendor]\[Modul]\Block\Adminhtml\Category\Widget\[Chooser]</frontend_model> Or $fieldset->addField( 'multi_category_chooser', '[Vendor]\[Modul]\Block\Adminhtml\Category\Widget\[Chooser]', [ 'name' => 'multi_category_chooser', 'label' => __('Categories'), 'title' => __('Categories'), 'required' => true ] ); To Be Continued in below url Multiple Category Chooser I hope this will help you. Related SolutionsMagento – Add a class to custom Widget input field I scoured through Magento source, and I did not find where an additional value would be set in widget.xml. While it's a bit annoying, I resorted to using my own <type>. My widget.xml contains: <my_param translate="label"> <required>1</required> <visible>1</visible> <label>My Label</label> <type>module/my_custom_block</type> </my_param> The annoying part is that my block class only contains: class Module_Name_Block_My_Custom_Block extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element { public function render(Varien_Data_Form_Element_Abstract $element) { $element->addClass('my-class'); $this->_element = $element; return $this->toHtml(); } } Default Values of Multiselect Input in Widget Options Using widget.xml If I remember correctly multiselect values are stored comma separated. Have you tried <value>opt1,opt2</value> ? Related TopicMagento 2 – Set Default Value in Yes/No Field of Widget.xmlMagento2 XML – Fix Not Working in Widget.xmlMagento – Magento 2 Add widget using WYSIWYG field in a custom widget
Best Answer
You need to create a category chooser for the Magento Admin Panel:
Backend configurations:
Or
);
To Be Continued in below url
Multiple Category Chooser
I hope this will help you.