Repeater: Choose Tournament Winners

Filament 4/5
Also available in Filament 3 version

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.

VJF6mXKDREdAtP0BIp4S80a86UUyk7-metaNC1yZXBlYXRlci10b3VybmFtZW50LXdpbm5lcnMucG5n-

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
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 168 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 168 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

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 Tournament model, from method country()
  • In the Select, we use the ->live()->disableOptionWhen() method and the $get variable 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.