F
Filament8mo ago
Dwayne

How to set width of registration page

I've created a custom page for the registration process. I want the content to be wider. The getMaxContentWidth function isn't doing anything. So, the white block needs to become wider.
namespace App\Filament\Admin\Pages\Auth;

use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Form;
use Filament\Pages\Auth\Register as RegisterPage;
use Filament\Forms\Components\Wizard;
use Filament\Support\Enums\MaxWidth;

class CustomRegistration extends RegisterPage implements HasForms
{
public function mount(): void
{
parent::mount();
}

public function form(Form $form): Form
{
return $form
->schema([
Wizard::make([
Wizard\Step::make('Personal')
->schema([
// ...
]),
Wizard\Step::make('Company')
->schema([
// ...
]),
Wizard\Step::make('Account')
->schema([
// ...
]),
])
])
->statePath('data');
}

public function getMaxContentWidth(): MaxWidth
{
return MaxWidth::Full;
}
}
namespace App\Filament\Admin\Pages\Auth;

use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Form;
use Filament\Pages\Auth\Register as RegisterPage;
use Filament\Forms\Components\Wizard;
use Filament\Support\Enums\MaxWidth;

class CustomRegistration extends RegisterPage implements HasForms
{
public function mount(): void
{
parent::mount();
}

public function form(Form $form): Form
{
return $form
->schema([
Wizard::make([
Wizard\Step::make('Personal')
->schema([
// ...
]),
Wizard\Step::make('Company')
->schema([
// ...
]),
Wizard\Step::make('Account')
->schema([
// ...
]),
])
])
->statePath('data');
}

public function getMaxContentWidth(): MaxWidth
{
return MaxWidth::Full;
}
}
No description
4 Replies
irfancan
irfancan8mo ago
""
Dennis Koch
Dennis Koch8mo ago
You probably need to overwrite the view file of the guest layout or add some CSS to overwrite it.
David Vincent
David Vincent8mo ago
No need to overwrite the view, I did it using protected ?string $maxWidth = '3xl'; and you don't need to implement HasForms, as SimplePage alrready implements it
otm
otm5mo ago
Wizard::make([ Wizard\Step::make('Personal') ->schema([ // ... ]), Wizard\Step::make('Company') ->schema([ // ... ]), Wizard\Step::make('Account') ->schema([ // ... ]), ]) ->columnSpan('full')
Want results from more Discord servers?
Add your server