Ok i admit defeat, is there a way to just save the data then open the modal? So they save it opens modal with the newly saved data from the form? Thanks
Feb 21, 2025
1
Level 4
Modal preview of form coming form blade view
Hi I am trying to work out the best way of getting form data that is not saved in to my preview modal, at the moment I have a modal with a blade view, pulling in data that is saved in the db and it is working well, but im not sure the best way to pull in data to the modal on new additions to the form that are not yet saved?
In my edit application resource I have
Action::make('preview')
->label('Preview Profile')
->icon('heroicon-o-eye')
->modalContent(function () {
$record = $this->getRecord();
$formData = collect($this->data)->except(['status'])->toArray();
$record->fill($formData);
return view('application.preview', [
'application' => $record,
'isPreview' => true
]);
})
->modalWidth('7xl')
the rich editor changes are showing in preview but normal fields or selects are not, what is the best way to achieve a preview with changes that are not yet saves in fIlament as I may be going the wrong route, thanks
Please or to participate in this conversation.