How to extract a form object in Filament V2?
Received a great pointer yesterday to here for Custom Pages https://www.youtube.com/watch?v=8Di6Yrqgsl8
Problem is, it's for V3, and I'm trying to finish my old V2 project first before migrating to V3
The dashboard renders, but the form does not 😦
Tried consulting this, but still feel stuck. Any help would be much appreciated!
https://livewire.laravel.com/docs/forms#extracting-a-form-object
Custom Page CompanyMembers.php
Blade (adjusted x-filament for V2)
Filament Daily
YouTube
Filament: Only Edit Form with Custom Page and Livewire
If you want to use a Filament form outside of the Resource, here's one example.
Original tutorial. Filament: Edit Only Single Record with Custom Page https://laraveldaily.com/post/filament-edit-only-single-record-custom-page
Laravel
Forms | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
7 Replies
you can't use form objects with v2
you said it yourself
The way I did it even when it's just one form (my needs were to add multiple forms on a page) is this:
The keys you have in the getForms array are what you use in the blade file to display them. $this->form in this case.
This is my blade file:
You are mixing Livewire forms with Filament Form Builder. Please refer the Filament docs and not to Livewire docs.
Got something urgent right now, will test this tomorrow first thing in the morning! Thanks!
That's precisely what I did, but it was very hard for me to translate V2 Filament Documentation for custom pages into what this guy does here
https://www.youtube.com/watch?v=8Di6Yrqgsl8
...and I ended up trying to imitate what he does with my little knowledge only to fail 🙇♂️
Filament Daily
YouTube
Filament: Only Edit Form with Custom Page and Livewire
If you want to use a Filament form outside of the Resource, here's one example.
Original tutorial. Filament: Edit Only Single Record with Custom Page https://laraveldaily.com/post/filament-edit-only-single-record-custom-page
Your not doing yourself when you apply stuff from v3 videos to v2. Just follow the form builder docs.
I'll try to conquer it again using only v2 docs 🐘
This works perfectly, but I'll try to do the same thing with V2 docs (only edit route, single entry (no table generated))
Okay so...
What if I need to have only 1 page that creates entry or edits it, no intermediary table pages on Filament V2 (the video does it successfully on V3)?
My original idea was to grab the logic from /edit route and modify it, but this did not work (the /edit route is simply empty and not populated)...
CompanyMembers.php (Custom Page)