F
Filament9mo 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
MexataOP9mo ago
anyone?
Mexata
MexataOP9mo ago
i tried using that but couldnt figure it out
LeandroFerreira
LeandroFerreira9mo ago
What is the issue? Did you add this in the CreatePage?
Mexata
MexataOP9mo 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
LeandroFerreira9mo 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
MexataOP9mo ago
from filament
LeandroFerreira
LeandroFerreira9mo ago
What is the resource name?
Mexata
MexataOP9mo ago
CardResource.php and my create page is called CreateCard.php
LeandroFerreira
LeandroFerreira9mo ago
yes.. is there in the Pages folder?
Mexata
MexataOP9mo ago
yes
LeandroFerreira
LeandroFerreira9mo ago
'create' => Pages\CreateCard::route('/create') you should put the HasWizard trait in the CreateCard class
Mexata
MexataOP9mo 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

Did you find this page helpful?