wanted to hide submit button of wizard from when form submitted and show thank you message

I am using filament wizard form in livewire screen on last step when form is submitted i wanted to show thankyou message with some content and hide the submit button when form is submitted #form-builder
Solution:
the submit button is rendered on the last step. Maybe you could hide the wizard and show a custom message after the form is submitted: ```php public bool $showMessage = false; ......
Jump to solution
1 Reply
Solution
LeandroFerreira
the submit button is rendered on the last step. Maybe you could hide the wizard and show a custom message after the form is submitted:
public bool $showMessage = false;
...

Wizard::make([
Wizard\Step::make('Step...')
->schema([
// ...
]),
])
->hidden(fn (): bool => $this->showMessage)
->submitAction(new HtmlString(Blade::render(<<<'BLADE'
<x-filament::button
type="submit"
size="sm"
>
Submit
</x-filament::button>
BLADE))),

Placeholder::make('message')
->content('The form was submitted successfully!')
->visible(fn (): bool => $this->showMessage)
public bool $showMessage = false;
...

Wizard::make([
Wizard\Step::make('Step...')
->schema([
// ...
]),
])
->hidden(fn (): bool => $this->showMessage)
->submitAction(new HtmlString(Blade::render(<<<'BLADE'
<x-filament::button
type="submit"
size="sm"
>
Submit
</x-filament::button>
BLADE))),

Placeholder::make('message')
->content('The form was submitted successfully!')
->visible(fn (): bool => $this->showMessage)

Did you find this page helpful?