F
Filamentβ€’4mo ago
morty

How can I add `mailto:` to an email in an infolist text entry?

Things I've tried:
Infolists\Components\TextEntry::make('e_mail')
->label('Email')
->icon('heroicon-m-envelope')
->placeholder('-')
->formatStateUsing(fn (string $state): HtmlString => new HtmlString("mailto:{$state}")),
Infolists\Components\TextEntry::make('e_mail')
->label('Email')
->icon('heroicon-m-envelope')
->placeholder('-')
->formatStateUsing(fn (string $state): HtmlString => new HtmlString("mailto:{$state}")),
Infolists\Components\TextEntry::make('e_mail')
->label('Email')
->icon('heroicon-m-envelope')
->placeholder('-')
->formatStateUsing(fn (string $state): string => "mailto:{$state}")
->html(),
Infolists\Components\TextEntry::make('e_mail')
->label('Email')
->icon('heroicon-m-envelope')
->placeholder('-')
->formatStateUsing(fn (string $state): string => "mailto:{$state}")
->html(),
Both just give me this:
No description
Solution:
Try this. ```php use Illuminate\Support\HtmlString; ...
Jump to solution
5 Replies
Solution
Mansoor Khan
Mansoor Khanβ€’4mo ago
Try this.
use Illuminate\Support\HtmlString;

->formatStateUsing(fn ($state) => new HtmlString("<a href='mailto:{$state}'>{$state}</a>"))
use Illuminate\Support\HtmlString;

->formatStateUsing(fn ($state) => new HtmlString("<a href='mailto:{$state}'>{$state}</a>"))
morty
mortyβ€’4mo ago
omg I'm dumb forgot the anchor sheesh Thanks!
Mansoor Khan
Mansoor Khanβ€’4mo ago
Now help me solve mine LOL.
morty
mortyβ€’4mo ago
I checked your post out, sorry man I haven't tackled file uploads yet.
Mansoor Khan
Mansoor Khanβ€’4mo ago
Dont be sorry, no problem πŸ™‚
Want results from more Discord servers?
Add your server
More Posts
How to display a custom message when there are no options to display in Checkbox list?Is there a way to display a custom message to the user when there are no options do display in CheckUpload image from URLI am trying to upload a file from url to FileUpload field. Has anyone tried something like this befomarkdowneditor not workingi have a loop and i create some markdowneditor in the loop. but they don't get any value and returnBlade components outside of FilamentAm I not able to do something like ` <x-filament::button>Test</x-filament::button>` in my Laravel apTwo widgets differents in the same rowI know there is an identical question but it was not answered, I understand that a widget takes the Download in PDF my filament page (with all css and features) (ctr+P is not working well)I'm trying to download my view in a PDF file but it doesn't work. I'm inside the Model file, ProposaAuthentication user provider is not definedI am trying to access current user in the AdminPanelProvider but I get the title error. auth()->useconditional entry name on the make methodI can't find any reference how to do conditional inside the make method like the `TextEntry` here ``Using Filament only as a "CRUD add-on" within a bigger appI'm thinking of using Filament for its CSV import feature because I love the look and feel and FilamHow to Add Middleware to check if license expired and redirect to somewhereBefore Run login page I want to check Is the license expired or not? If it is expired Is the license