Help with filament , How to get data from selected to show only to input text
Hello, can someone help me , how can i show the data in this selected multiple relationship to input text only.
Select::make('salary_name_id')
->required()
->relationship('salary_name', 'name')
->searchable()
->preload()
->live()
->afterStateUpdated(function (Set $set) {
$set('salary_step_id', null);
$set('salary_value_id', null);
})
Select::make('salary_step_id')
->required()
->options(fn (Get $get): Collection => Salarystep::query()
->where('salary_name_id', $get(salary_name_id'))
->pluck('name', 'id'))
->searchable()
->preload(),
TextInput::make(''salary_value_id_id')
->required(),
2 Replies
can you be more elaborate, what are you trying to achieve?
example , when select salary grade (salary_name_id) , then select step (salary_step_id) will enable , then the input text salary value(salary_value_id) will show the data which relationship with Salary Grade name and Salary Step ,in each step have different values