How to use html field type in child table doctype?

I want to say “Hello World” to each row . How to achieve from child table?

why you want to say hello world in each row :rofl: :rofl:

1 Like

I Just wanna try :sweat_smile:

U mean you just want to show some text for each row or you want proper html with styling??

yes , that may help too

  1. just text field for hello world for each row
  2. custom html with style
    choose one


you mean like this

frappe.ui.form.on("Vendor ", {
    form_render: function(frm, cdt, cdn) {
        // This is the child row
        let row = locals[cdt][cdn];

        // Update the parent HTML field
        frm.set_value("table_address", "<div style='color: blue; font-weight: bold;'>Hello World</div>");
    }
});

well Vendor is child table doctype
I have js in same doctype but not working for me :roll_eyes:

Hello @Prasant_Pant ,
for HTML field you should fill Options of the field. In client script use frm.set_df_property(fieldname,”options”, html_code).

Thank you.
Jiří Šír

1 Like

frm.fields_dict[“table_address”].grid.update_docfield_property(
“select_route”, “options”, <div style='color: blue; font-weight: bold;'>Hello World</div>
);

this works better for child table. Thanks