This project illustrates the Filament Repeater field with positional element management. When selecting the top 3 tournament winner countries, each chosen country automatically becomes unavailable in the remaining dropdown selections to prevent duplicates.
Get the Source Code:
Only This Example
$9
One-time payment
Full source code for Repeater: Choose Tournament Winners
Downloadable ZIP file with the source code
Lifetime access to this example
Sign in with GitHub to buy
Sign in first, then complete your $9 checkout.
Best value — all 177 examples
View membership plans
FilamentExamples Membership
$99
/year
or
$199
lifetime
Access to code of all 177 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
30-day money-back guarantee
How it works
The whole logic of this live-updated form is in the Filament Resource file, in its form() method.
- We're using
Repeater::make()with->defaultItems(3)->addable(false)->deletable(false)to have strictly 3 items. - We load the options for the repeater Select from the Relationship of
Tournamentmodel, from methodcountry() - In the Select, we use the
->live()->disableOptionWhen()method and the$getvariable inside to define which options should be disabled - We use
->afterStateHydrated()in repeater to transform the results into the format we actually need to save to the DB.
The full code of that method:
The FULL tutorial is available after the purchase: in the Readme file of the official
repository you would get invited to.