F
Filamentβ€’16mo ago
andis

Summary step for wizard?

Whats the best way to add a summary step to the wizard where the user can review all the data entered in previous steps?
Solution:
Got it, you are doing it inside the actualy view right? try: $getState...
Jump to solution
12 Replies
hckwnn
hckwnnβ€’16mo ago
Hello, Before V3 update, I used Placeholders in the Summary Step. You can fill them with the data array containing the form state path. You can write a first step: TextInput::make('name') And the summary step: Placeholder::make('summary_name')->content($this->data['name'] ?? '')->label('Name') You can use $this->getRecord()->name if you don't want to define an form state path array. Dont know if it is the best way today. But works fine for me
toeknee
toekneeβ€’16mo ago
I suppose what you want is a requiresConfirmation() on the wizard steps. I would do similar to above, and a tick box to confirm they have read the placeholer info
andis
andisOPβ€’16mo ago
This is for placing an order so I was hoping for a custom layout where I can summarize the line items before purchase
toeknee
toekneeβ€’16mo ago
Can you provide your current view? It might be you jut need a step inbetween steps to review and then order? For example I have 1 step, then a review step, the review step uses a custom view and we put the data in there.
andis
andisOPβ€’16mo ago
I guess I just need a way to access the current form data in the view but I could not find an easy way to do that.
toeknee
toekneeβ€’16mo ago
You can do that no problem $this->getState() I think or $this->form->getState()
andis
andisOPβ€’16mo ago
'$this' is an instance of my relationship manager.
Solution
toeknee
toekneeβ€’16mo ago
Got it, you are doing it inside the actualy view right? try: $getState
andis
andisOPβ€’16mo ago
$getState did the trick Thanks for that
toeknee
toekneeβ€’16mo ago
Ahh great, memories not what it used to be πŸ™‚
CaptainJoker
CaptainJokerβ€’16mo ago
How do we acheive this in the modal of a relationship manager?
toeknee
toekneeβ€’16mo ago
The same way?
Want results from more Discord servers?
Add your server