crankier
crankier
FFilament
Created by Gediminas on 2/6/2024 in #❓┊help
[Reapeater] Repeater question about one column getting data from the other one
You can use afterStateUpdated() and $set to set the value of another field. Assuming the select field contains the ID value of the user and the age field is called 'age' on the repeater:
Select::make('user_id')
->afterStateUpdated(function($state, Set $set){
$user = User::find($state);
$set('age',$user->age)
})
Select::make('user_id')
->afterStateUpdated(function($state, Set $set){
$user = User::find($state);
$set('age',$user->age)
})
You can read up more about form injection here https://filamentphp.com/docs/3.x/forms/advanced#form-component-utility-injection
5 replies
FFilament
Created by crankier on 2/6/2024 in #❓┊help
Class "Filament\Forms\Components\XXXX" not found on remote server. Dashboard and List are working.
Ok apparently it's something very simple. TextArea should be Textarea.
4 replies