ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Child Table Does not Work in Web Form

Dear ERP Family,

In web form, we have faced a lot of problems one of them:

  1. When you create a field of type “Child Table” after saving the data is not displayed.

  2. Custom script does not work in the webform.

Thank you in Advance

Maybe you misses out the some links provided by frappe. And you can write custom script on the same form. and it will work.

Hi,

Take a look at this thread:
https://discuss.erpnext.com/t/data-not-saved-in-web-form-child-table/55070/25

Hello, is there an event listener for child table in web form? Just like in a doctype form .js that you can use frappe.ui.form.on() function.?
bdw, I’m using the v12 frappe.

Client Script

put this code in client script in web form that you want

frappe.web_form.validate = () => {
let data = frappe.web_form.get_values();
frappe.web_form.doc[‘name_of_your_child_table’] = data.name_of_your_child_table;
return true;
};

for example:
frappe.web_form.validate = () => {
let data = frappe.web_form.get_values();
frappe.web_form.doc[‘language’] = data.language;
return true;
};