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
Is it a Filament Custom Page?
afatmustafa
afatmustafaOP2y ago
Yes
LeandroFerreira
any console error?
afatmustafa
afatmustafaOP2y ago
awcodes
awcodes2y ago
Double check your model. This error is saying that ‘phones’ isn’t a property on the model.
LeandroFerreira
Can you share the blade view code please?
afatmustafa
afatmustafaOP2y ago
Just this
LeandroFerreira
Can you share the whole page class?
afatmustafa
afatmustafaOP2y ago
LeandroFerreira
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
afatmustafaOP2y ago
afatmustafa
afatmustafaOP2y ago
added it but the problem still persists.
LeandroFerreira
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
afatmustafaOP2y ago
Yes! It works thanks a lot Leandro
LeandroFerreira
Sorry.. I forgot mount 👍
Want results from more Discord servers?
Add your server