© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
ots

custom page repeater does not delete from database

 public function editShippingForm(Form $form): Form
    {
        return $form->schema([
            Repeater::make(__('labels.shipping_methods'))
                ->schema([
                    TextInput::make('erp_code')
                        ->required()
                        ->label(__('labels.erp_or_store')),
                    TextInput::make('store_code')
                        ->label(__('labels.store_code'))
                        ->required(),
                ])
                ->columns(2)
                ->addActionLabel(__('labels.new_entry'))
                ->statePath('shippingData')
        ]);
    }
 public function editShippingForm(Form $form): Form
    {
        return $form->schema([
            Repeater::make(__('labels.shipping_methods'))
                ->schema([
                    TextInput::make('erp_code')
                        ->required()
                        ->label(__('labels.erp_or_store')),
                    TextInput::make('store_code')
                        ->label(__('labels.store_code'))
                        ->required(),
                ])
                ->columns(2)
                ->addActionLabel(__('labels.new_entry'))
                ->statePath('shippingData')
        ]);
    }
in this form when removing a repeated text input it does update the state but does not actually remove it from the database. is there a way to link the model in this custom page? or a way to override the default delete function? This is how my data is mounted
  $shippingData = SettingsShipping::all();


        $formattedShippingData = [];

        foreach ($shippingData as $shippingDatum) {
            $formattedShippingData[] = [
                'erp_code' => $shippingDatum->erp_code,
                'store_code' => $shippingDatum->store_code,
            ];
        }

        $this->editShippingForm->fill(['shippingData' => $formattedShippingData]); 
  $shippingData = SettingsShipping::all();


        $formattedShippingData = [];

        foreach ($shippingData as $shippingDatum) {
            $formattedShippingData[] = [
                'erp_code' => $shippingDatum->erp_code,
                'store_code' => $shippingDatum->store_code,
            ];
        }

        $this->editShippingForm->fill(['shippingData' => $formattedShippingData]); 
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

Custom Page Repeater Delete Item
FilamentFFilament / ❓┊help
3y ago
Repeater not working on custom page
FilamentFFilament / ❓┊help
2y ago
Custom page repeater not saving data.
FilamentFFilament / ❓┊help
2y ago
Custom page form repeater livewire error: property does not exist
FilamentFFilament / ❓┊help
14mo ago