diff --git a/src/lib/components/refactor/ComposerForm.svelte b/src/lib/components/refactor/ComposerForm.svelte index d458876..260f480 100644 --- a/src/lib/components/refactor/ComposerForm.svelte +++ b/src/lib/components/refactor/ComposerForm.svelte @@ -3,10 +3,16 @@ import { afterUpdate } from 'svelte'; import { writable } from 'svelte/store'; import { RangeSlider, SlideToggle } from '@skeletonlabs/skeleton'; + import TextInput from './inputfields/TextInput.svelte'; export let me; - const { initialFormData, fields, validators } = $me.context; + const { fields, validators } = $me.context; + + const initialFormData = fields.reduce((acc, field) => { + acc[field.name] = field.placeholder; + return acc; + }, {}); const { form, errors, validate, constraints } = superForm(initialFormData, { validators: validators, @@ -83,31 +89,32 @@ {:else}