I have to add read only form field in UI component form. I have tried disabled input field but it is different from the readonly as described below.

According to magento documentation:

Read-only Form Data:

It may be necessary or advantageous to display form field data that cannot be changed or edited. In these cases the form label should appear to provide context for the “read-only” data, but not the field bounding-box so that it is clear to the user that the data cannot be edited.

Link: http://devdocs.magento.com/guides/v2.0/pattern-library/getting-user-input/form_elements/form_elements.html#read

Read only field

Disabled field

I have done a lot of research but can't figure it out by myself. I will very grateful if someone can assist.

  • 1
    For those who have marked this question as duplicate, There is difference in the GUI of both read only and disabled fields as i have already described above. For convenience, i also added the images. Commented Nov 30, 2017 at 7:08


Browse other questions tagged or ask your own question.