Magento2 – Disable UI Component Fieldset with Condition

adminmagento2uicomponent

I try it but not working. everyone can help me plz!
enter image description here

Best Answer

If you are using magento2.3.1 need to change your filed component code in xml file like below

           <field name="sort_order" formElement="input">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="source" xsi:type="string">page</item>
                    </item>
                </argument>
                <settings>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <dataType>text</dataType>
                    <label translate="true">Sort Order</label>
                    <dataScope>sort_order</dataScope>
                     <imports>
                        <link name="disabled">${ $.provider}:data.do_we_hide_it</link>
                    </imports>
                </settings>
            </field>
Related Topic