© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
Martin

Accessing $records in hintAction

I have a form field and would like to access the record I'm editing in a hint action...

Textarea::make()
  ->rows(3)
  ->hintAction(
      Forms\Components\Actions\Action::make('generate_title')
          ->icon('heroicon-o-arrow-path')
          ->action(function (?Role $record, Set $set) {
              ray($record);
...
Textarea::make()
  ->rows(3)
  ->hintAction(
      Forms\Components\Actions\Action::make('generate_title')
          ->icon('heroicon-o-arrow-path')
          ->action(function (?Role $record, Set $set) {
              ray($record);
...


Record is null here... what's the right way to access the record? Thanks!
Solution
Try
fn ($livewire) => $livewire->getRecord()
fn ($livewire) => $livewire->getRecord()
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to use SpatieMediaLibraryFileUpload in hintAction?
FilamentFFilament / ❓┊help
3y ago
Accessing Selected Records on Page without BulkActions
FilamentFFilament / ❓┊help
5mo ago
hintaction location on infolists
FilamentFFilament / ❓┊help
2y ago
Testing a HintAction in a Relation Manager
FilamentFFilament / ❓┊help
2y ago