FormModal: hide lookup fields and drop required validation
This commit is contained in:
parent
f05ea4b23e
commit
179c956926
@ -52,7 +52,10 @@ export default function FormModal({ activityId, instanceId, title, onClose, onSu
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getFormScreen(activityId, instanceId)
|
getFormScreen(activityId, instanceId)
|
||||||
.then((res: any) => {
|
.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);
|
setFields(f);
|
||||||
setGridConfig(res.grid_config ?? []);
|
setGridConfig(res.grid_config ?? []);
|
||||||
setFormTitle(res.activity_name || title || "Form");
|
setFormTitle(res.activity_name || title || "Form");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user