Filament\Forms\Components\Builder::Filament\Forms\Components\{closure}(): Argument #1 ($itemData) must be of type array, string given Filament\Forms\Components\Builder::Filament\Forms\Components{closure}(): Argument #1 ($itemData) must be of type array, string given
Code:
Card::make()
->schema([
FormsBuilder::make('content')
->label('İçerik')
->blocks([
FormsBuilder\Block::make('heading')
->schema([
TextInput::make('content')
->label('Heading')
->required(),
Select::make('level')
->options([
'h1' => 'Heading 1',
'h2' => 'Heading 2',
'h3' => 'Heading 3',
'h4' => 'Heading 4',
'h5' => 'Heading 5',
'h6' => 'Heading 6',
])
->required(),
]),
])->columnSpan(2),
])->columns(2),
I'm getting this error on the edit page. Can you help me solve it?
Please edit your code to format the code. Unformatted code like this is impossible to read. You can make code blocks by adding three backticks (```) on a separate line before and after the code.
Also, what is FormsBuilder? There’s no such class in Filament, as far as I can tell.
It was necessary to edit $casts from the model page. Thanks.
protected $casts = [
'layout' => 'json',
];
Please sign in or create an account to participate in this conversation.