fix: skip hidden and mandatory check when allow_incomplete is set

This commit is contained in:
Kaushal Shriwas 2026-04-19 16:48:35 +05:30
parent b354a30aed
commit 87b0824031

View file

@ -114,6 +114,8 @@ class WebForm(WebsiteGenerator):
frappe.throw(_("Following fields are missing:") + "<br>" + "<br>".join(missing))
def validate_hidden_and_mandatory(self):
if self.allow_incomplete:
return
for d in self.web_form_fields:
if (d.hidden and d.reqd) and not (d.default or frappe.flags.in_migrate):
frappe.throw(