diff --git a/packages/client/src/components/app/forms/InnerForm.svelte b/packages/client/src/components/app/forms/InnerForm.svelte index 432c9b2bde..1a544832d4 100644 --- a/packages/client/src/components/app/forms/InnerForm.svelte +++ b/packages/client/src/components/app/forms/InnerForm.svelte @@ -83,6 +83,8 @@ return fields.find(field => get(field).name === name) } + $: console.log(fields) + const formApi = { registerField: ( field, @@ -136,7 +138,12 @@ }) // Add this field - fields = [...fields, fieldInfo] + if (existingField) { + const otherFields = fields.filter(info => get(info).name !== field) + fields = [...otherFields, fieldInfo] + } else { + fields = [...fields, fieldInfo] + } return fieldInfo },