Different Form in the same resource
It may be a silly question but how can I change the form in the edit page of a resource? I'm going to use the same one I got defined in the resource.php but with a little more info.
Solution:Jump to solution
I mean, fields 3 and 4 will be visible only in the edit form..
```php
Forms\Components\TextInput::make('field1'),
Forms\Components\TextInput::make('field2'),
Group::make([...
4 Replies
Inject
$operation
to check if a form is edit
https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-current-form-operationso I make two forms in the resource and add ->operation('edit) in the one I want to use in the editPage, which is the one that has got more components?
can I just somehow create a new form in the Edit.php?
Solution
I mean, fields 3 and 4 will be visible only in the edit form..
okay,perfect,exactly what I wanted.Thanks a lot