F
Filament9mo ago
Hadi

RegisterTenant View layout

how to change the layout of the RegisterTenant Page to fit the Wizard ? and how to hide the register button till the last step of wizard?
No description
5 Replies
Dan Harrin
Dan Harrin8mo ago
without sending code for the page and view we cant help
Hadi
HadiOP8mo ago
namespace App\Filament\App\Pages\Tenancy;

use Filament\Pages\Tenancy\RegisterTenant;
use Filament\Support\Enums\MaxWidth;

class RegisterBusiness extends RegisterTenant
{

// protected static string $view = 'filament.app.pages.tenancy.register-business';

public static function getLabel(): string
{
return 'Register Business';
}

public function form(Form $form): Form
{
return $form
->schema([
Wizard::make([
Wizard\Step::make('Brand Info')
->schema([
]),
Wizard\Step::make('Availability')
->schema([
]),
])
]);
}

protected function handleRegistration(array $data): Business
{
$business = Business::create($data);

$business->employees()->attach(auth()->user());

return $business;
}
}
namespace App\Filament\App\Pages\Tenancy;

use Filament\Pages\Tenancy\RegisterTenant;
use Filament\Support\Enums\MaxWidth;

class RegisterBusiness extends RegisterTenant
{

// protected static string $view = 'filament.app.pages.tenancy.register-business';

public static function getLabel(): string
{
return 'Register Business';
}

public function form(Form $form): Form
{
return $form
->schema([
Wizard::make([
Wizard\Step::make('Brand Info')
->schema([
]),
Wizard\Step::make('Availability')
->schema([
]),
])
]);
}

protected function handleRegistration(array $data): Business
{
$business = Business::create($data);

$business->employees()->attach(auth()->user());

return $business;
}
}
register-business.blade.php
<x-filament-panels::page.simple>

</x-filament-panels::page.simple>
<x-filament-panels::page.simple>

</x-filament-panels::page.simple>
Hey Dan, perhaps my question should be: Is there a view that I can extend to fit the wizard in it, instead of using 'page.simple'?
Dan Harrin
Dan Harrin8mo ago
no
Dan Harrin
Dan Harrin8mo ago
following the docs like this will only show the submit button on the last step as per your original question

Did you find this page helpful?