F
Filament16mo ago
SLINZEN

TextInput default = object?

Hi, I want to set a default value in my Input. Example:
TextInput::make('')
->label('Test')
->default('Hi Discord.')
->readOnly()
TextInput::make('')
->label('Test')
->default('Hi Discord.')
->readOnly()
But the input value is [object Object]
8 Replies
LeandroFerreira
LeandroFerreira16mo ago
TextInput::make('test')
->label('Test')
->default('Hi Discord.')
->readOnly()
TextInput::make('test')
->label('Test')
->default('Hi Discord.')
->readOnly()
SLINZEN
SLINZENOP16mo ago
Thank you. But now the input is empty.
LeandroFerreira
LeandroFerreira16mo ago
are you using the panel builder or form builder?
SLINZEN
SLINZENOP16mo ago
I use the panel builder with getSteps
LeandroFerreira
LeandroFerreira16mo ago
default will work on the CreatePage
SLINZEN
SLINZENOP16mo ago
Only create, not on EditRecord?
SLINZEN
SLINZENOP16mo ago
Hm.. then I'll probably have to create my own component 😄 Thanks for your help!

Did you find this page helpful?