F
Filament9mo ago
Liam

Checkboxes list options HTML

Hello, I have a config file which I pass to the options() function on a checkbox list form component. The labels in the config file contain some line breaks. I need to render the labels as HTML
2 Replies
morty
morty9mo ago
->allowHtml() or
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => new HtmlString('Alpine.js'),
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
])
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => new HtmlString('Alpine.js'),
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
])
Liam
LiamOP9mo ago
->allowHtml is not a available method on the Checkboxes List thing, only on a select. ->options(collect(config('accessibilities'))->mapWithKeys(fn ($value, $key) => [$key => new HtmlString($value)])) this worked
Want results from more Discord servers?
Add your server