Filament: Parent-child Dependent Dropdowns

This project demonstrates the Filament Select field with the ability to refresh the options based on the value of another dropdown option.

The example is with countries and cities: in a form to add a new shop, when you choose a country, the list of cities is refreshed.


Get the Source Code:

How it works

For the first select, we generate options from the DB. The first select field must be set to live().

The second select input makes a DB request after selecting the value in the first select.

Based on the first select, we set a placeholder for the second select input.

Here is what these two select inputs look like...

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 50 Premium Examples for $99 Only Form Examples for $39