Form in page

Hi guys, I'm making a user profile that using custom Page and form aside layout. Current it doesnt have form and button to submit. I want to inject to button at the bottom of the form. Here is my code
class Profile extends Page
{
...

public function updateProfileForm(Form $form): Form
{
return $form->schema([
Group::make()
->id('personalInformation')
->extraAttributes([
'class' => 'p-16 max-w-5xl',
])
->schema([
Section::make(__('Personal Information'))
->description(__('Manage your personal information'))
->aside()
->schema([
TextInput::make('name')
->required(),
TextInput::make('email')
->required()
->email()
->unique(ignoreRecord: true),
]),
]),
])
->statePath('userDate');
}

...
}
class Profile extends Page
{
...

public function updateProfileForm(Form $form): Form
{
return $form->schema([
Group::make()
->id('personalInformation')
->extraAttributes([
'class' => 'p-16 max-w-5xl',
])
->schema([
Section::make(__('Personal Information'))
->description(__('Manage your personal information'))
->aside()
->schema([
TextInput::make('name')
->required(),
TextInput::make('email')
->required()
->email()
->unique(ignoreRecord: true),
]),
]),
])
->statePath('userDate');
}

...
}
<x-filament::page>
{{ $this->updateProfileForm }}

{{ $this->changePasswordForm }}
</x-filament::page>
<x-filament::page>
{{ $this->updateProfileForm }}

{{ $this->changePasswordForm }}
</x-filament::page>
8 Replies
ngoquocdat
ngoquocdatOP2y ago
here is what i want
Dennis Koch
Dennis Koch2y ago
Don't use a group inside the from but in your Blade view instead.
ngoquocdat
ngoquocdatOP2y ago
thanks for reply me. but how to use group in blade view, is there mentioned in the docs?
Dennis Koch
Dennis Koch2y ago
I bet there is a card component. No blade components are not documented. Check the source code
ngoquocdat
ngoquocdatOP2y ago
ok, thx i will check
ngoquocdat
ngoquocdatOP2y ago
found it
Dennis Koch
Dennis Koch2y ago
That's not what I meant, but if it works 🤷🏼‍♂️
ngoquocdat
ngoquocdatOP2y ago
okay, hh. btw, thank you
Want results from more Discord servers?
Add your server