Show data in Select, based on relation manager
I need your help with a query. In this case, the Task model, will generate all Tasks. But I only want the tasks that are in the relation manager of the project that I select via Select
20 Replies
I want to create a entry in the TimeRegistration resource. And I have 2 Selects. The Project resource has a task relation manager, where you can assign tasks. When I select a project in the Select, I only want to be able to select the tasks (in the task Select) associated with that Project
maybe use a SelectFilter?
isnt the selectfilter only at tables?
This is a form
the relation manager is a table
Correct, but in this case im in the TimeRegistration resource, and when Im creating a entry, then I should be able to choose based on what task is available for that project
ohh do you want a dependant select
search "dependant select" in the docs
I just saw your video
This one, right?
https://youtu.be/W_eNyimRi3w
Dan Harrin
YouTube
Dependant Select Inputs - Filament TALL Stack Form Builder
This video, we are using the filament/forms package. You can read the full documentation at: https://filamentadmin.com/docs/forms
You can find out more about Filament on our website: https://filamentadmin.com
Follow me on Twitter for more tutorials and other TALL stack tips: https://twitter.com/danjharrin
If you found this video useful, pleas...
yeah
Whats supposed to be on the left side of pluck?
$project->tasks()
No, I meant instead of 'task; or 'title' like you have in your video, what is supposed to be there?
I get this error
Maybe smth missing in the model?
it's the name of the column that provides labels for the select
is there a task
name
or title
?''name"
so
pluck('name', 'id')
Now the task, shows projects, not the tasks associated with that proj
I got it!