@php /** @var \Laravel\Boost\Install\GuidelineAssist $assist */ @endphp ## Inertia + Svelte Forms - There are critical differences between Svelte 4 and 5, use the `search-docs` tool for up-to-date guidance. @if($assist->inertia()->hasFormComponent()) @boostsnippet("`
` Component Example", "svelte5") {#snippet children({ errors, hasErrors, processing, progress, wasSuccessful, recentlySuccessful, setError, clearErrors, resetAndClearErrors, defaults, isDirty, reset, submit, })} {#if errors.name}
{errors.name}
{/if} {#if wasSuccessful}
User created successfully!
{/if} {/snippet}
@endboostsnippet @endif @if($assist->inertia()->hasFormComponent() === false) {{-- Inertia 2.0.x, not 2.1.0 or higher. So they still need to use 'useForm' --}} @boostsnippet("Inertia Svelte useForm Example", "svelte")
{#if $form.errors.email}
{$form.errors.email}
{/if} {#if $form.errors.password}
{$form.errors.password}
{/if} Remember Me
@endboostsnippet @endif