imbra
1
Hello, how can i show data in an HTML field in a childtable here below am trying but am getting an error? petails is not found
frappe.ui.form.on_change('Viehal', {
"tools": function(frm,cdt,cdn) {
let row = locals[cdt][cdn];
let html='<div class="grid-container">';
html+='<div id="accordion">';
html+= `<div><h2>Title 2</h2></div>`
html+='</div>';
html+='</div>';
row.fields_dict.petails.html(html);
},
});
jk_09
2
@imbra
frappe.model.set_value(cdt, cdn, ‘your field name’, value to set);
imbra
3
For child table, HTML field
jk_09
4
sorry this will work for value set in HTML editor Not in HTML
imbra
6
But am trying to add data in HTML field that is in a child table
Hello @imbra Have you got any solution for how to add html in html field for a child table?
imbra
9
frappe.ui.form.on('Viehal', {
tools: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
$(frappe.get_field(cdt, cdn, 'petails').wrapper).html(`
<div class="grid-container">
<div id="accordion">
<div><h2>Title 2</h2></div>
</div>
</div>
`);
}
});
1 Like