Render HTML in select options filamentphp

hey please help me about Render HTML in select options filamentphp
3 Replies
tuto1902
tuto19029mo ago
Use ->allowHtml()
use Filament\Forms\Components\Select;

Select::make('technology')
->options([
'tailwind' => '<span class="text-blue-500">Tailwind</span>',
'alpine' => '<span class="text-green-500">Alpine</span>',
'laravel' => '<span class="text-red-500">Laravel</span>',
'livewire' => '<span class="text-pink-500">Livewire</span>',
])
->searchable()
->allowHtml()
use Filament\Forms\Components\Select;

Select::make('technology')
->options([
'tailwind' => '<span class="text-blue-500">Tailwind</span>',
'alpine' => '<span class="text-green-500">Alpine</span>',
'laravel' => '<span class="text-red-500">Laravel</span>',
'livewire' => '<span class="text-pink-500">Livewire</span>',
])
->searchable()
->allowHtml()
https://filamentphp.com/docs/3.x/forms/fields/select#allowing-html-in-the-option-labels
brahim
brahim9mo ago
Ty but i want render image in select Its possible ??
tuto1902
tuto19029mo ago
I don't think it is. At least not to my knowledge