From 179c95692683bc5dc2d2cfed29e526305cdf1977 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Sai Potteri Date: Sat, 23 May 2026 16:07:23 +0530 Subject: [PATCH] FormModal: hide lookup fields and drop required validation --- src/components/FormModal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/FormModal.tsx b/src/components/FormModal.tsx index a67e4d4..845839f 100644 --- a/src/components/FormModal.tsx +++ b/src/components/FormModal.tsx @@ -52,7 +52,10 @@ export default function FormModal({ activityId, instanceId, title, onClose, onSu useEffect(() => { getFormScreen(activityId, instanceId) .then((res: any) => { - const f: FormField[] = res.fields ?? res.form_json?.fields ?? []; + const raw: FormField[] = res.fields ?? res.form_json?.fields ?? []; + const f = raw + .filter((field) => field.data_type !== "lookup") + .map((field) => ({ ...field, mandatory: false })); setFields(f); setGridConfig(res.grid_config ?? []); setFormTitle(res.activity_name || title || "Form");