Custom page with a wizard form
Ok only started using Filament this week, so forgive me if I'm missing something very basic. I'm trying to create a custom page with a wizard form component. I've got that working but when I try to add a select to the first page of the wizard based on a relationship in the model I get an error message
Solution:Jump to solution
The
$model
property is only (I think) used on Resources. If you're creating a custom page that interacts with a single record, you need a way to bind it to a specific record, so you need to set ->model()
on the form itself4 Replies
This is my custom page as it stands
In order to access a relationship, you need to set the related
$model
on the form: https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#setting-a-form-model@Ross Bearman isn't that what this line is doing?
Solution
The
$model
property is only (I think) used on Resources. If you're creating a custom page that interacts with a single record, you need a way to bind it to a specific record, so you need to set ->model()
on the form itself