© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
9 replies
yeonjih

Computation from separate repeater

How to get the total of the inputtext value from separate repeater?
image.png
Solution
Repeater::make('repeater')
    ->schema([...]),

Placeholder::make('total')
    ->content(function ($get) {
        $total = Arr::map($get('repeater'), function ($item) {
            return $item['qtd'] * $item['price'];
        });

        return array_sum(array_values($total));
    })
Repeater::make('repeater')
    ->schema([...]),

Placeholder::make('total')
    ->content(function ($get) {
        $total = Arr::map($get('repeater'), function ($item) {
            return $item['qtd'] * $item['price'];
        });

        return array_sum(array_values($total));
    })

Could be better I think
Jump to solution
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

Separate APIs from Filament
FilamentFFilament / ❓┊help
6mo ago
Separate Filters from table
FilamentFFilament / ❓┊help
3y ago
Repeater requiredIf validation from the field outside of repeater
FilamentFFilament / ❓┊help
2y ago
Get field data of parent repeater from nested repeater
FilamentFFilament / ❓┊help
2y ago