Change custom field color in frappe

how to change field color in child table

            frm.add_child('child_table_doctype', {
                "col_1": first_data,
                "col_2": `<p style='color:red;'>${second_data}</p>`
            });

UPDATE (NEXT DAY)

            frm.add_child('child_table_doctype', {
                "col_1": first_data,
                "col_2s": `<p style='color:red;'>${second_data}</p>`,
                "col_2": second_data
            });
  • col_2 : real => not displayed, but saved
  • col_2s : shadow => displayed, but not saved

This change avoids saving HTML wrapped data to the backend.

2 Likes