Magento 2 Allow NULL Value Multiselect System Configuration

It can be achieved bu adding the <can_be_empty>1</can_be_empty> tag in system.xml file

Ex:

<field id="hideprice" translate="label" type="multiselect" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Hide Price For</label>
<source_model>PHPCodez\Permission\Model\Config\Source\Group\Multiselect</source_model>
<can_be_empty>1</can_be_empty>
</field>

Leave a Reply

Your email address will not be published. Required fields are marked *