F
Filament3mo ago
Emaz

Custom blade view during create

Is it possible to display a blade view with record data during create? I've seen the docs for custom layouts https://filamentphp.com/docs/3.x/forms/layout/custom#view-components But using getRecord it's obviously null during create - might be useful for edit. My use case is a complex form to create an invoice. I'd like to use 1/2 of the view for the form fields and 1/2 using the View component to show a blade layout as you go. Is this possible? I've seen https://github.com/andrewdwallo/erpsaas which gives SOME clues but it's pretty hard to understand.
GitHub
GitHub - andrewdwallo/erpsaas: A Laravel and Filament-powered accou...
A Laravel and Filament-powered accounting platform, crafting a modern and automated solution for financial management. - andrewdwallo/erpsaas
Solution:
@Emaz it's all in the docs - you just define the ViewField with your Blade inside: https://filamentphp.com/docs/3.x/forms/fields/custom#view-fields
Jump to solution
4 Replies
krekas
krekas3mo ago
what's hard to understand from that repo? the author is in this server try asking his help
Solution
Povilas K
Povilas K3mo ago
@Emaz it's all in the docs - you just define the ViewField with your Blade inside: https://filamentphp.com/docs/3.x/forms/fields/custom#view-fields
Povilas K
Povilas K3mo ago
I've shot a video about it, from the erpsaas you mentioned: https://www.youtube.com/watch?v=oOpJN3FEAq8
Filament Daily
YouTube
Filament Custom Page Example: Invoice Preview
A pretty impressive open-source example of invoice HTML rendered inside of the Form page with Livewire. Source: https://github.com/andrewdwallo/erpsaas
Emaz
Emaz3mo ago
Yeah I'm seeing it now - the repo you were reviewing here, I just had to dig deeper into the code. Thanks!
Want results from more Discord servers?
Add your server
More Posts