I want to set field outline color to orange

i want to set outline border for these fields ‘custom_item_code’,
‘item_name’,
‘custom_company’,
‘stock_uom’

Please elaborate.

@neha try this client script code where Item is my doctype:

frappe.ui.form.on('Item', {
	refresh(frm) {
		var element = document.querySelector('[data-doctype="Item"][data-fieldname="item_name"]');
		element.style.border="solid 1px green";
	}
})

4 Likes

Thank You!

Hi,

This solution is working on Parent DocType records. However, it is not working on the Child records. Is there any change in syntax for Child DocType records?

Here is the code :

	f1  = document.querySelector('[data-doctype="Items"][data-fieldname="item_code"]');

	f1.style.border="solid 1px green";

Thanks,
Joseph