F
Filament13mo 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
LeandroFerreira13mo ago
TextInput::make('test')
->label('Test')
->default('Hi Discord.')
->readOnly()
TextInput::make('test')
->label('Test')
->default('Hi Discord.')
->readOnly()
SLINZEN
SLINZENOP13mo ago
Thank you. But now the input is empty.
LeandroFerreira
LeandroFerreira13mo ago
are you using the panel builder or form builder?
SLINZEN
SLINZENOP13mo ago
I use the panel builder with getSteps
LeandroFerreira
LeandroFerreira13mo ago
default will work on the CreatePage
SLINZEN
SLINZENOP13mo ago
Only create, not on EditRecord?
SLINZEN
SLINZENOP13mo ago
Hm.. then I'll probably have to create my own component 😄 Thanks for your help!

Did you find this page helpful?