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
![]()
1 Like
I Just wanna try ![]()
U mean you just want to show some text for each row or you want proper html with styling??
yes , that may help too
- just text field for hello world for each row
- custom html with style
choose one
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 ![]()
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
