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:
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([...
Jump to solution
4 Replies
Barbaracrlp
Barbaracrlp3mo ago
so 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
LeandroFerreira
LeandroFerreira3mo ago
I mean, fields 3 and 4 will be visible only in the edit form..
Forms\Components\TextInput::make('field1'),
Forms\Components\TextInput::make('field2'),
Group::make([
Forms\Components\TextInput::make('field3'),
Forms\Components\TextInput::make('field4')
])->visibleOn('edit')
Forms\Components\TextInput::make('field1'),
Forms\Components\TextInput::make('field2'),
Group::make([
Forms\Components\TextInput::make('field3'),
Forms\Components\TextInput::make('field4')
])->visibleOn('edit')
Barbaracrlp
Barbaracrlp3mo ago
okay,perfect,exactly what I wanted.Thanks a lot