Magento 2 Unable To Unselect All Multiselect Values

Add the tag <can_be_empty>1</can_be_empty> with the field in system.xml file and now you should be enable to Unselect the multi select values.

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 *