Filtering a Select field's options based on a parent relationship
I'm creating a form where I can create a new instance of a
CompletedTrainingQualification
, which uses a BelongsTo TrainingQualification
relationship, which in turn BelongsTo a TrainingProvider
.
My issue is that I would like to have a form that utilises a select box to select a provider, and then the value of training_qualification_id can be selected in a seperate select box (using the normal select relationship field in filament), where the options are only those which have a training_provider_id of the one selected.
I am open to achieving this is a different way too, but the main point is being able to select a qualification based off of the provider, where the provider is not stored on the CompletedTrainingQualification record when the form is submitted.
Grateful for any help, cheers.2 Replies
would this package be able to handle this sort of thing? https://github.com/CodeWithDennis/filament-select-tree
GitHub
GitHub - CodeWithDennis/filament-select-tree: The multi-level selec...
The multi-level select field lets you pick one or multiple options from a list that is neatly organized into different levels. - GitHub - CodeWithDennis/filament-select-tree: The multi-level select...
If anyone has any experience using this plugin could you please let me know π