{#if title}
{title}
{/if} {#each errorMessages as error}
{error}
{/each}
{#each fields as field}
{field}
{#if schema[field].type === 'string' && schema[field].constraints.inclusion}
{#each schema[field].constraints.inclusion as opt}
{opt}
{/each}
{:else if schema[field].type === 'datetime'}
{:else if schema[field].type === 'boolean'}
{:else if schema[field].type === 'number'}
{:else if schema[field].type === 'string'}
{/if}
{/each}
{#if saved}
Success
{:else}
{buttonText || 'Submit Form'}
{/if}