diff --git a/src/components/forms/DynamicForm.tsx b/src/components/forms/DynamicForm.tsx index f7a6098..5dd0cad 100644 --- a/src/components/forms/DynamicForm.tsx +++ b/src/components/forms/DynamicForm.tsx @@ -791,12 +791,20 @@ export function DynamicForm({ client, activityId: initialActivityId, instanceId: const isValEmpty = val === undefined || val === null || String(val).trim() === ''; const currentFieldError = showErrors && f.mandatory && isValEmpty ? 'Required' : undefined; + let displayVal = (val as string) ?? ''; + if (schema.field_defaults?.[f.id]?.prefill?.value === 'current_user_id') { + const user = client.currentUser(); + if (user && String(val) === String(user.id)) { + displayVal = user.name; + } + } + return ( handleFieldChange(f.id, newVal)} error={currentFieldError} />