Child table in web form not working

Attempting to create a web form with a child table but the form doesn’t load correctly. Regardless if which columns I add to the child table it only displays “Role”. It does show the correct number of rows in the table but the values are always empty.

If I try adding a row to the table the following javascript error is displayed in the console:

TypeError: is undefined[Learn More]                                       grid.js:477:3
   add_new_row    grid.js:477:3
   make/<         grid.js:95:2

Is there something I’m doing wrong?

@nowylie, what is your code so far? Or maybe the checkbox 'In List View’in the fields is not set correctly in the Doctype?

I believe the checkbox is set correctly. The child table displays on the parent doctype normally from the desk side.

I tried installing erpnext to test and from memory the student applicant webform wasn’t showing it’s child table correctly either.

I have a similar issue when I create a web form on a Material Request. Trying to add a row in the grid gives

Uncaught TypeError: Cannot read property 'push' of undefined
    at Grid.add_new_row (grid.js:477)
    at HTMLButtonElement.<anonymous> (grid.js:95)
    at HTMLButtonElement.dispatch (jquery.min.js:3)
    at HTMLButtonElement.r.handle (jquery.min.js:3)

@nowylie did you manage to find a solution?

I am facing the same issue. Uncaught TypeError: Cannot read property 'push' of undefined at Grid.add_new_row (grid.js:480) I am using the latest erpnext 12 version. having the same issue on erpnext 11 as well. Is there any solution to this ?

@nowylie Now you can make child table in web form only with v12.

1 Like