FilamentF
Filament3y ago
Adri

Custom Page with Form Builder

Hello Guys, I'm testing the Custom Page and i have a problem with the Repeater Component.
It's simply don't start the component.
The warning in browser console is printed.

This is my blade content:

<x-filament-panels::page>
    {{ $this->form }}
</x-filament-panels::page>


This is my page class:

<?php

namespace App\Filament\Pages;

use Filament\Actions\Concerns\InteractsWithActions;
use Filament\Actions\Contracts\HasActions;
use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Form;
use Filament\Pages\Page;

class Settings extends Page implements HasForms, HasActions
{
    use InteractsWithActions;
    use InteractsWithForms;

    protected static ?string $navigationIcon = 'heroicon-o-document-text';

    protected static string $view = 'filament.pages.settings';

    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Repeater::make('items')
                ->schema([
                    TextInput::make('title')->required(),
                ])
                ->addActionLabel('Add member')
                ->defaultItems(3)
            ]);
    }

}
image.png
image.png
Was this page helpful?