Open another form modal from a form modal
https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component#chaining-actions
I have a CreateAction that lets users create personal access tokens.
After the token is created, I want to close the modal and show a new modal with the plain text token so they can copy it and only see it once.
I know we can chain actions in Filament PHP, but I get an error when I try to pass the token to a form. Could anyone help or share a suggestion? Thank you!
7 Replies
but I get an error when I try to pass the token to a form.It would help if you'd share the error and some code.
`
I kinda got it working (the modal opens after my initial action form), but the plainTextToken is null in my view. When I do dd($this->plainTextToken) before the "return view()" then it works fine.
But for some reason it doesn't get passed to the view, and I can't figure out why.
Interesting, it seems like the data is unavailable again once the form opens.

$this
probably refers to the action. Try injecting $livewire
into to closure and use thatSame issue unfortunately
Solution
What about this?
Yes this works, thanks!