© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
Polash

Issue with Repeater

Trying to make a form with the repeater where I can pick a date and add multiple members with a type tag. How can I achieve it?
#TIA

the form:
public static function form(Form $form): Form
    {
        return $form
            ->schema([

                Forms\Components\DatePicker::make('start_date')->rules(['required'])->label('Week Start Date')->required(),

                Repeater::make('items')
                    ->schema([

                        Forms\Components\Select::make('member_id')
                            ->relationship('member', 'name')
                            ->searchable()
                            ->preload()->rules(['required'])->label('Member Name')->required(),

                            Forms\Components\Select::make('type')
                            ->options([
                                'Productive' => 'Productive',
                                'Effective' => 'Effective',
                                "CEO's Favorite" => "CEO's Favorite",  
                                ])->searchable()->label('Winning Type')
                            ->required(),

                    ]),

            ]);
    }
public static function form(Form $form): Form
    {
        return $form
            ->schema([

                Forms\Components\DatePicker::make('start_date')->rules(['required'])->label('Week Start Date')->required(),

                Repeater::make('items')
                    ->schema([

                        Forms\Components\Select::make('member_id')
                            ->relationship('member', 'name')
                            ->searchable()
                            ->preload()->rules(['required'])->label('Member Name')->required(),

                            Forms\Components\Select::make('type')
                            ->options([
                                'Productive' => 'Productive',
                                'Effective' => 'Effective',
                                "CEO's Favorite" => "CEO's Favorite",  
                                ])->searchable()->label('Winning Type')
                            ->required(),

                    ]),

            ]);
    }

and the migration table:

        Schema::create('weekly_winners', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('member_id');
            $table->foreign('member_id')->references('id')->on('members');
            $table->date('start_date')->nullable();
            $table->string('type')->nullable();
            $table->timestamps();
        });
        Schema::create('weekly_winners', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('member_id');
            $table->foreign('member_id')->references('id')->on('members');
            $table->date('start_date')->nullable();
            $table->string('type')->nullable();
            $table->timestamps();
        });
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Repeater issue
FilamentFFilament / ❓┊help
2y ago
issue with repeater and relationship
FilamentFFilament / ❓┊help
7mo ago
Issue with Pivot relation on Repeater
FilamentFFilament / ❓┊help
3y ago