is there is any way to change font color and background for doc type to make it attractive??
Hello @NCP
Is there any option to change the color of text in erpnext.
like different customer in diffrent colors, or diffrent colors to custommers and suppliers
NCP
May 11, 2023, 5:28am
3
Hi @umarless ,
Please check it.
Maybe its help you.
frappe.ui.form.on('Student', {
refresh: function(frm) {
var rows = document.getElementsByClassName("grid-row");
var relationshipDetails = frm.doc.student_relationship_detail;
for (var i = 1; i < rows.length; i++) {
rows[i].style.backgroundColor = ""; // Reset color for all rows
if (relationshipDetails && relationshipDetails[i-2]) {
var relation_field = relationshipDetails[i-2].relationship;
console.log(`${relation_field} ${i}`);
if (relation_f…
Thank You!
2 Likes
@Anmol_b1994 ,
You Can add css using js in doctype.js file with the htm class.
1 Like