Hi, I need a help!
How to add a child table in dialog box, This is what I have tried but table is not getting display.
This is what the output now I am able to get.
But I need to add a table, on this dialog box. How to achieve?
Thank You.
Hi, I need a help!
How to add a child table in dialog box, This is what I have tried but table is not getting display.
This is what the output now I am able to get.
But I need to add a table, on this dialog box. How to achieve?
Thank You.
do it like below
const table_fields = [
{
fieldname: "File",
fieldtype: "Attach",
in_list_view: 1,
label: "Files",
},
];
var d = new frappe.ui.Dialog({
fields: [
{
fieldname: "ht",
fieldtype: "HTML",
},
{
fieldname: "Comment",
fieldtype: "SmallText",
default: "",
},
{
fieldname: "file",
fieldtype: "Table",
label: "Attach Files",
cannot_add_rows: false,
in_place_edit: true,
reqd: 0,
data: [],
fields: table_fields,
},
],
Hi,@mohitchechani After adding this, even dialog box also not displaying. Are there any change need to be made?
const table_1 = [{
fieldname: "table_2",
fieldtype: "table",
in_list_view: 1,
label: "table_2"
},];
var dialog = new frappe.ui.Dialog({
title: __('Custom Size Dialog'),
fields: [
{fieldtype: "Section Break"},
{"fieldtype": "Heading" , "fieldname": "form_name" , "label": "Form Name", "options": ""},
{"fieldtype": "Link" , "fieldname": "link_1" , "label": "", "options": "value"},
{"fieldtype": "Heading" , "fieldname": "blocks_details" , "label": "Blocks Details", "options": ""},
{fieldtype: "Table" , fieldname : "table_2" , label: "", "options": "Block Confirmation",
cannot_add_rows: false,in_place_edit: true, reqd: 0, data:[],field: table_1},
{"fieldtype": "Data" , "fieldname": "qg_cbm" , "label": "QG. CBM", "options": ""},
{"fieldtype": "Heading" , "fieldname": "transport" , "label": "Transport", "options": ""},
//{"fieldtype": "Table" , "fieldname": "table_3" , "label": "", "options": "testing"},
],
});
//d.fields_dict.ht.$wrapper.html('Hello World');
dialog.show()