F
Filament7mo ago
Mexata

Remove Create and Create another button from wizard form

I have a wizard in a form:
public static function form(Form $form): Form
{
return $form
->columns(1)
->schema([
Wizard::make([ ... ])
])
}
public static function form(Form $form): Form
{
return $form
->columns(1)
->schema([
Wizard::make([ ... ])
])
}
but it still shows the "creat" and "create another" button. how do i remove those?
13 Replies
Mexata
MexataOP7mo ago
anyone?
Mexata
MexataOP7mo ago
i tried using that but couldnt figure it out
LeandroFerreira
LeandroFerreira7mo ago
What is the issue? Did you add this in the CreatePage?
Mexata
MexataOP7mo ago
yes i have but it wont show anything, maybe it has something to do with this being in the resource:
public static function getPages(): array
{
return [
'index' => Pages\ListRecord::route('/'),
'create' => Pages\CreateRecord::route('/create'),
'view' => Pages\ViewRecord::route('/{record}'),
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListRecord::route('/'),
'create' => Pages\CreateRecord::route('/create'),
'view' => Pages\ViewRecord::route('/{record}'),
];
}
would i have to put this in CreatePage or not?
LeandroFerreira
LeandroFerreira7mo ago
if you create a resource called Record, you should put this in the CreateRecord.php file is the CreateRecord from Filament or did you create a resource called Record?
Mexata
MexataOP7mo ago
from filament
LeandroFerreira
LeandroFerreira7mo ago
What is the resource name?
Mexata
MexataOP7mo ago
CardResource.php and my create page is called CreateCard.php
LeandroFerreira
LeandroFerreira7mo ago
yes.. is there in the Pages folder?
Mexata
MexataOP7mo ago
yes
LeandroFerreira
LeandroFerreira7mo ago
'create' => Pages\CreateCard::route('/create') you should put the HasWizard trait in the CreateCard class
Mexata
MexataOP7mo ago
Its fixed now, i had
'create' => Pages\CreateCard::route('/create')
'create' => Pages\CreateCard::route('/create')
didnt work but changing that to
'create' => CreateCard::route('/create')
'create' => CreateCard::route('/create')
worked for some reason thank you
Want results from more Discord servers?
Add your server