How to disable this input field, It's a custom attribute.enter image description here


You need to create Namespace/Module/view/base/ui_component/customer_form.xml and add the following code

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="customer">
        <field name="your_custom_attribute_code" formElement="input">
            <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="disabled" xsi:type="boolean">true</item>

replace your read-only attribute code with your_custom_attribute_code

I hope this solution will solve your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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