How can I pull the data I saved in the Modal Form?

In this way, after saving the data in the modal form, my wizard process continues, but is there any way to bring the saved data back into the wizard outside the modal form? I tried to explain in the photos exactly what I wanted to do.
Wizard::make([
Wizard\Step::make('Şirketteki Insanlar')
->schema([
Actions::make([
Action::make('star')
->icon('heroicon-m-plus')
->label('Bir Kişi Ekleyin')
->form([
Wizard::make([
Wizard\Step::make('Hesap Bilgileri')->schema([
TextInput::make('name')->label('Ad'),
TextInput::make('email')->label('mail'),
]),
])
])
->action(function (array $data, User $user): void {
$user->name=$data['name'];
$user->email=$data['email'];
$user->password=Hash::make('123456');
$user->save();
})
]),
]),
Wizard::make([
Wizard\Step::make('Şirketteki Insanlar')
->schema([
Actions::make([
Action::make('star')
->icon('heroicon-m-plus')
->label('Bir Kişi Ekleyin')
->form([
Wizard::make([
Wizard\Step::make('Hesap Bilgileri')->schema([
TextInput::make('name')->label('Ad'),
TextInput::make('email')->label('mail'),
]),
])
])
->action(function (array $data, User $user): void {
$user->name=$data['name'];
$user->email=$data['email'];
$user->password=Hash::make('123456');
$user->save();
})
]),
]),
No description
No description
No description
7 Replies
Mehmet K.
Mehmet K.4mo ago
Yes, I am saving a forum here. When I exit that action, I want to show this data again in that form or in an input in the create section.
Mehmet K.
Mehmet K.4mo ago
No description
LeandroFerreira
LeandroFerreira4mo ago
maybe using Set $set?
Mehmet K.
Mehmet K.4mo ago
Sorry don't work
LeandroFerreira
LeandroFerreira4mo ago
this works here
return $form
->schema([
TextInput::make('title1'),
Actions::make([
Actions\Action::make('custom_action')
->form([
TextInput::make('title2'),
])
->action(function (array $data, Set $set) {
$set('title1', $data['title2']);
}),
]),
]);
return $form
->schema([
TextInput::make('title1'),
Actions::make([
Actions\Action::make('custom_action')
->form([
TextInput::make('title2'),
])
->action(function (array $data, Set $set) {
$set('title1', $data['title2']);
}),
]),
]);
Mehmet K.
Mehmet K.4mo ago
Thank you İt's work 🙂