In Magento 2.3.1, I want to do like :

If all store view, then input text should be enable. Othervise, input text should be disable.

I follow this answer : click here

But, still I'm not getting output.

How to do that?

Any help would be appreciated.


1 Answer 1


your form element should be like:

   <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>
                <rule name="required-entry" xsi:type="boolean">true</rule>
            <label translate="true">Sort Order</label>
                <link name="disabled">${ $.provider}:data.do_we_hide_it</link>

   **And you Dataprovider condition should be like below:**

        if ($storeId && $storeId != 0) { 
        $this->loadedData[$banner->getBannerId()]['do_we_hide_it'] = true; 
        } else { 
        $this->loadedData[$banner->getBannerId()]['do_we_hide_it'] = false; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.