Hi @FHenry:
Yes. Seems that no many people showed interest at that time …
I am interested on this feature, I don’t how many people could be interested too.
I’ve made some experimental tentatives … but just for data output …
frappe.ui.form.on("YourChildDoctype", {
form_render(frm, cdt, cdn) {
var d = locals[cdt][cdn]
let html = `
<style>
/* Custom styles for the table */
.wide-table {
width: 100%; /* Make table wider */
}
.first-column {
width: 60%; /* First column gets 60% width */
}
.text-right {
text-align: right; /* Align text to the right for numeric columns */
}
</style>
<div class="container mt-3">
<table class="table table-bordered table-hover wide-table">
<!-- Table Head -->
<thead class="thead-light">
<tr>
<th scope="col" class="first-column">Description</th>
<th scope="col" class="text-right">Qty</th>
<th scope="col" class="text-right">Amount</th>
</tr>
</thead>
<!-- Table Body -->
<tbody>
<tr>
<td>Product 1</td>
<td class="text-right">5</td>
<td class="text-right">€50.00</td>
</tr>
<tr>
<td>Service 2</td>
<td class="text-right">2</td>
<td class="text-right">€200.00</td>
</tr>
<tr>
<td>Product 3</td>
<td class="text-right">3</td>
<td class="text-right">€150.00</td>
</tr>
<tr>
<td>Service 4</td>
<td class="text-right">1</td>
<td class="text-right">€100.00</td>
</tr>
<tr>
<td>Product 5</td>
<td class="text-right">10</td>
<td class="text-right">€500.00</td>
</tr>
<tr>
<td>Service 6</td>
<td class="text-right">4</td>
<td class="text-right">€400.00</td>
</tr>
</tbody>
</table>
</div>
`;
frm.cur_grid.grid_form.fields_dict.your_html_field.html(html);
}
});
Just a try, without fetching data from other doctypes, but is doable.
Hope this helps.
