Sharing State between forms

I have a custom livewire page in which I need to build many custom forms.

You can think about it like a wizard but I can't use a wizard for it since the structure will be much more complex.

What I want to do is to create multiple forms and render them conditionally on the front end.

I have started by having 2 forms and both of them use Section layout.

I want that when the first form is submitted perform some DB updates and update the state of the second form.

Things that should change are that I want to collapse the first form, extend the second form, and for now just fill the TextInput with whatever the value was in the first form TextInput::make('name')

Issues I am having are.

  1. When I click next first time nothing happens, only when I click the second time does the collapse/extend get updated ( I did DD in the method submitAffiliateProgram and it does get called the first time but the frontend is not updated )
  2. I can't get value from the first form in the second form.
Was this page helpful?