© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
N16htSh1ft

Infolist - TextEntry - listWithLineBreaks

Hello together!

I am new in this channel and kind of afraid that I do something wrong with my post. So upfront please excuse for it.

Issue:
I am storing in my table data with line breaks e.g.
"v=spf1
+ip4:192.168.2.1
+ip4:192.168.2.2
-all"
"v=spf1
+ip4:192.168.2.1
+ip4:192.168.2.2
-all"


I am using in my Resource the public static function infolist and try together with
TextEntry::make
TextEntry::make
and
->listWithLineBreaks()
->listWithLineBreaks()
to display the line breaks in the view. However, it seems that the line breaks are ignored and all is in one line.
E.g.
 } else {
                $schema[] = TextEntry::make('spf_details')
                    ->label('SPF Record(s)')
                    ->badge()
                    ->icon('heroicon-m-server-stack')
                    ->iconColor('primary')
                    ->listWithLineBreaks()
                    ->weight(FontWeight::Bold)
                    ->color('success')
                    ->size(TextEntry\TextEntrySize::Large);
                }
...
 } else {
                $schema[] = TextEntry::make('spf_details')
                    ->label('SPF Record(s)')
                    ->badge()
                    ->icon('heroicon-m-server-stack')
                    ->iconColor('primary')
                    ->listWithLineBreaks()
                    ->weight(FontWeight::Bold)
                    ->color('success')
                    ->size(TextEntry\TextEntrySize::Large);
                }
...


Does anyone has a hint what I am doing wrong?

Greetings and happy coding!

N16htSh1ft
Solution
I think listWithLineBreaks() is expecting the data to be in an array. Feel like you’re just thinking about it wrong. You might need to format the state to use something like php’s nl2br or convert the state to an array using the breaks as a delimiter.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Infolist TextEntry
FilamentFFilament / ❓┊help
2y ago
Infolist TextEntry label
FilamentFFilament / ❓┊help
3y ago
Enum in TextEntry of InfoList
FilamentFFilament / ❓┊help
2y ago
Dynamic value in infoList TextEntry
FilamentFFilament / ❓┊help
3y ago