TagsInput not displaying in custom page

I am having an issue with the TagsInput, not displaying in a custom page. Specifically, the tag input field is not visible. Can someone please assist me with troubleshooting this problem? Here's my getFormSchema code
protected function getFormSchema(): array
{
return [
Section::make('')
->columns(2)
->compact()
->schema([
TagsInput::make('phones'),
Textarea::make('message')
->columnSpanFull(),
]),
];
}
protected function getFormSchema(): array
{
return [
Section::make('')
->columns(2)
->compact()
->schema([
TagsInput::make('phones'),
Textarea::make('message')
->columnSpanFull(),
]),
];
}
15 Replies
LeandroFerreira
LeandroFerreira16mo ago
Is it a Filament Custom Page?
afatmustafa
afatmustafa16mo ago
Yes
LeandroFerreira
LeandroFerreira16mo ago
any console error?
afatmustafa
afatmustafa16mo ago
awcodes
awcodes16mo ago
Double check your model. This error is saying that ‘phones’ isn’t a property on the model.
LeandroFerreira
LeandroFerreira16mo ago
Can you share the blade view code please?
afatmustafa
afatmustafa16mo ago
Just this
LeandroFerreira
LeandroFerreira16mo ago
Can you share the whole page class?
afatmustafa
afatmustafa16mo ago
LeandroFerreira
LeandroFerreira16mo ago
Actually, you need to implement Forms\Contracts\HasForms And use Forms\Concerns\InteractsWithForms
class SendManuelSms extends Page implements Forms\Contracts\HasForms
{
use Forms\Concerns\InteractsWithForms;
...
}
class SendManuelSms extends Page implements Forms\Contracts\HasForms
{
use Forms\Concerns\InteractsWithForms;
...
}
afatmustafa
afatmustafa16mo ago
afatmustafa
afatmustafa16mo ago
added it but the problem still persists.
LeandroFerreira
LeandroFerreira16mo ago
my bad. Should work Can you share the code on gist please? hum, maybe the mount method:
public function mount(): void
{
$this->form->fill();
}
public function mount(): void
{
$this->form->fill();
}
afatmustafa
afatmustafa16mo ago
Yes! It works thanks a lot Leandro
LeandroFerreira
LeandroFerreira16mo ago
Sorry.. I forgot mount 👍