F
Filamentβ€’11mo 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
LeandroFerreiraβ€’11mo ago
TextInput::make('test')
->label('Test')
->default('Hi Discord.')
->readOnly()
TextInput::make('test')
->label('Test')
->default('Hi Discord.')
->readOnly()
SLINZEN
SLINZENOPβ€’11mo ago
Thank you. But now the input is empty.
LeandroFerreira
LeandroFerreiraβ€’11mo ago
are you using the panel builder or form builder?
SLINZEN
SLINZENOPβ€’11mo ago
I use the panel builder with getSteps
LeandroFerreira
LeandroFerreiraβ€’11mo ago
default will work on the CreatePage
SLINZEN
SLINZENOPβ€’11mo ago
Only create, not on EditRecord?
SLINZEN
SLINZENOPβ€’11mo ago
Hm.. then I'll probably have to create my own component πŸ˜„ Thanks for your help!
Want results from more Discord servers?
Add your server