F
Filament3mo ago
o.m

How to allow form submission on CustomPages?

I have this custom page the displays some prefilled values but I also wanted to create a data in this custom page
class CreateGroupSettings extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.create-group-settings';
public static bool $shouldRegisterNavigation = false;
protected static ?string $slug = 'group-settings/create';

public $sectionId;
( some code )

public function mount(): void
{
(some code)
}
}
class CreateGroupSettings extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.create-group-settings';
public static bool $shouldRegisterNavigation = false;
protected static ?string $slug = 'group-settings/create';

public $sectionId;
( some code )

public function mount(): void
{
(some code)
}
}
I get this error after submitting the form
No description
4 Replies
Dennis Koch
Dennis Koch3mo ago
Are you event using a Filament Form?!
o.m
o.mOP3mo ago
No this is a custom page
Dennis Koch
Dennis Koch3mo ago
You can still use a Form on a Custom Page. If you don't use a Filament Form, that questions isn't really Filament related. You either should use Livewire for Form submission or register a Laravel Controller.
o.m
o.mOP3mo ago
Thanks for that I'll consider using form then

Did you find this page helpful?