Make Serial Number textarea readonly via HTML

I wish to make this field Serial Number readonly without it affecting the ‘Add Serial No’ button. Is there a way where I can set its attribute to ‘readonly’ and the button stays as it is.


More details would be helpful !

Can’t see the pic …

Thanks for reply.

The button you see below - “Add Serial No” pops up a dialog box which displays all the serial numbers belonging to a certain warehouse from which an employee wishes to have an item issued.

Requirement is to restrict users from entering anything directly in that text field which is possible if that area is visible but readonly. Doing it via HTML is easy in Chrome Tools, but if I talk about code - this feature is provided in ERPNext itself and is in erpnext/public/js/utils.js defined as function setup_serial_no. I don’t wish to tinker with this code because this will cause changes in other doctypes using this function.

I got a suggestion that doing it via the front-end would be better. So what are some possible solutions ?
Also, trying to change the property of the field to readonly affects the button and both of them disappear as there is probably a jQuery code that appends the button to the serial number field, so any changes to the textarea are also applied to the button

check this topic here