Alireza Porthos
Alireza Porthos
FFilament
Created by Alireza Porthos on 10/26/2023 in #❓┊help
Can we use ViewPage form of a filament resource in another page?
hello and good day you all. I have a PostResource and it has view page. in the view page the form is field and disabled. I've been trying to show this form outside of this page, in a livewire component. Sth like this
class FilledPost extends Component implements HasForms
{
use InteractsWithForms;


public static function form(FormsForm $form)
{
$viewPage = new ViewPost();
$viewPage->mount(Post::first()->id);


return $form->schema($viewPage->getComponents());
}
}
class FilledPost extends Component implements HasForms
{
use InteractsWithForms;


public static function form(FormsForm $form)
{
$viewPage = new ViewPost();
$viewPage->mount(Post::first()->id);


return $form->schema($viewPage->getComponents());
}
}
the problem is that the output form is not filled and not even complete.
2 replies