Can i use a key/value logic on a textinput field?

Hi folks,

i have a field where i display the username. But i want to save the ID to the database. Is this possible?

   TextInput::make('user_id')
                        ->label('Gebruiker')
                        ->disabled()
                        ->id($user->id)
                        ->default($user->full_name),

i tried using id field
in default i display the username
Solution
i fixed this by making it a select field
Was this page helpful?