Forms within web forms (complex webforms)

When the Web User is filling out the Student Applicant web form, I would like the Web User to also fill out the Guardian details. However, the Student Applicant doctype is quite complex that I can’t find any solution to make this work.

The “Student Applicant” doctype has a field with fieldname “guardians” and fieldtype “Table” which is a table of “Student Guardian” doctype documents. The “Student Guardian” doctype has a field with a link to “Guardian” doctype. Below is what the “Student Guardian” table looks like in the web form. As you can see there is no way of filling out the “Guardian” details in the same form. Frappe/ERPNext does not allow custom buttons on web forms which would have been useful to trigger another form in a modal/dialog.

Ideally the solution would be similar to Desk such as below, but I can’t seem to find a way to do this.


Are there any solutions/work arounds?

1 Like

@rucha_mahabal is their a way out for this?

The erpnext team indeed support to show another web form after a specific form is shown, but I think It must be done programatically.

There is an example in the manufacture process about this. If you want to take a look , in manufacture process there is “Stock Entry” , and if you choose the stock entry type within that form to “Material Transfer for Manufacture” , then you need to fill the table of items that will be shown as a new web form on top of the current view.

In that child form of Items, there is a button called “Add Serial No” if the manufacturing process has a serial no support. That button will show another modal form. That modal form is created programatically by calling a JS file of “./erpnext/erpnext/public/js/utils/serial_no_batch_selector.js”

You could check it out if you want to observe it.

Hi @kocrotus, thanks for this. I did check it out but I believe the stock entry process you are referring to is done within desk. I am trying to look for a solution outside desk within the portal web forms. The issue is that the frappe.ui API is not accessible in portal web forms, only the frappe.web_forms API but this is very limited.

Hi @Alberto_Gutierrez
Any updates on that?