© 2026 Hedgehog Software, LLC

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

Is it possible to do a dynamic hint action?

Hello, I'm trying to add a hint action to a text input which would return a base url defined in the config + the value of the TextInput at the end.

TextInput::make('url')
->hintAction(
Action::make('goToUrl')
->url(function () {
// this should return a base url with the input value attached to the end
})
)

As an example, let's say my base url is "www.test.com" and then I input something into the "url" TextInput, like /users. The end result would be that the hint action url should be "www.test.com/users".

I'm not sure how to live update the hint action. Is there a way?
Solution
Forms\Components\TextInput::make('url')
    ->live(debounce: 500)
    ->hintAction(
        Forms\Components\Actions\Action::make('goToUrl')
            ->url(fn (Forms\Get $get): string => str('https://test.com/')->append($get('url')))
    )
Forms\Components\TextInput::make('url')
    ->live(debounce: 500)
    ->hintAction(
        Forms\Components\Actions\Action::make('goToUrl')
            ->url(fn (Forms\Get $get): string => str('https://test.com/')->append($get('url')))
    )

You can also use
onBlur: true
onBlur: true
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

Is it possible to open modal with form fields in hint action?
FilamentFFilament / ❓┊help
3y ago
Hint action disappear.
FilamentFFilament / ❓┊help
2y ago
hint action tests
FilamentFFilament / ❓┊help
3y ago
Dynamic hint not updating
FilamentFFilament / ❓┊help
3y ago