© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
27 replies
__Dementor

Repeater have problem

Hi

I have create depot delivery form.

return $form
  ->schema([
    Tabs::make()
      ->tabs([

        Tabs\Tab::make('General')
          ->schema([

            Forms\Components\Select::make('depot_id')
              ->label(__('depot_deliveries.create.depot'))
              ->required()
              ->columnSpanFull()
              ->relationship('depot', 'name', function ($query) {
                return $query->where('active', true);
              }),

            Forms\Components\TextInput::make('invoice_number')
              ->label(__('depot_deliveries.create.invoice_number'))
              ->required()
              ->columnSpanFull()
              ->maxLength(255),

            Forms\Components\DateTimePicker::make('delivery_date')
              ->required(),

          ]),

        Tabs\Tab::make('Products')
          ->schema([

            Forms\Components\Repeater::make('products')
              ->required()
              ->schema([

                Forms\Components\Select::make('product_id')
                  ->label(__('depot_deliveries.create.product_id'))
                  ->relationship('products', 'name')
                  ->required(),

                Forms\Components\TextInput::make('quantity')
                  ->label(__('depot_deliveries.create.product_quantity'))
                  ->numeric()
                  ->required(),

                Forms\Components\TextInput::make('price')
                  ->label(__('depot_deliveries.create.product_price'))
                  ->numeric()
                  ->required(),

            ])
            ->columns(3)
            ->collapsible(),

        ]),

    ])->columnSpanFull(),
  ]);
return $form
  ->schema([
    Tabs::make()
      ->tabs([

        Tabs\Tab::make('General')
          ->schema([

            Forms\Components\Select::make('depot_id')
              ->label(__('depot_deliveries.create.depot'))
              ->required()
              ->columnSpanFull()
              ->relationship('depot', 'name', function ($query) {
                return $query->where('active', true);
              }),

            Forms\Components\TextInput::make('invoice_number')
              ->label(__('depot_deliveries.create.invoice_number'))
              ->required()
              ->columnSpanFull()
              ->maxLength(255),

            Forms\Components\DateTimePicker::make('delivery_date')
              ->required(),

          ]),

        Tabs\Tab::make('Products')
          ->schema([

            Forms\Components\Repeater::make('products')
              ->required()
              ->schema([

                Forms\Components\Select::make('product_id')
                  ->label(__('depot_deliveries.create.product_id'))
                  ->relationship('products', 'name')
                  ->required(),

                Forms\Components\TextInput::make('quantity')
                  ->label(__('depot_deliveries.create.product_quantity'))
                  ->numeric()
                  ->required(),

                Forms\Components\TextInput::make('price')
                  ->label(__('depot_deliveries.create.product_price'))
                  ->numeric()
                  ->required(),

            ])
            ->columns(3)
            ->collapsible(),

        ]),

    ])->columnSpanFull(),
  ]);

After I send form I have error (photo). How I can resolve this? Products is a relationship, I have table
delivery_products
delivery_products
for this products.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

i have problem in Repeater
FilamentFFilament / ❓┊help
17mo ago
problem with Repeater
FilamentFFilament / ❓┊help
2y ago
repeater checkbox problem
FilamentFFilament / ❓┊help
3y ago
Problem update repeater Unknown column
FilamentFFilament / ❓┊help
3y ago