here the Current value is readonly field here the styling is not working.how to add outline for read only fields
Please check the syntax:
frappe.ui.form.on('Lead', {
refresh: function(frm) {
setTimeout( () => {
set_css();
}, 50);
}
});
function set_css() {
document.querySelectorAll("[data-fieldname='lead_name']").forEach(function(field) {
let wrapper = field.querySelector('.control-input-wrapper');
if (wrapper) {
let readOnlyField = wrapper.querySelector('.control-value');
if (readOnlyField) {
readOnlyField.style.outline = '2px solid';
}
}
});
}
Output:
Now you can set it according to the scenario.
is this works for dialog fields?
It’s difficult to set.