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");