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?
12 Replies
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 meI 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
This is for placing an order so I was hoping for a custom layout where I can summarize the line items before purchase
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.
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.
You can do that no problem
$this->getState() I think
or $this->form->getState()
'$this' is an instance of my relationship manager.
Solution
Got it, you are doing it inside the actualy view right? try:
$getState
$getState did the trick
Thanks for that
Ahh great, memories not what it used to be π
How do we acheive this in the modal of a relationship manager?
The same way?