© 2026 Hedgehog Software, LLC

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

hint action random data in form input

I am trying to create a reset password, the new password will auto generated on modal pop-up, when they click "refresh" it will change the password string (random).

What I did:
Auto generated password is done but I am stuck on refresh (hint action)
My code:

Tables\Actions\Action::make('resetPassword')
    ->requiresConfirmation()
    ->fillForm([
        'password' => Str::random(12),
    ])
    ->form([
        Forms\Components\TextInput::make('password')
            ->required()
            ->hintAction(
                Action::make('refresh')
                    ->hiddenLabel()
                    ->icon('heroicon-o-arrow-path')
                    ->action(function (array $data) {
                        dd($data); // how to make random 'password' again?
                    })
            )
    ])
Tables\Actions\Action::make('resetPassword')
    ->requiresConfirmation()
    ->fillForm([
        'password' => Str::random(12),
    ])
    ->form([
        Forms\Components\TextInput::make('password')
            ->required()
            ->hintAction(
                Action::make('refresh')
                    ->hiddenLabel()
                    ->icon('heroicon-o-arrow-path')
                    ->action(function (array $data) {
                        dd($data); // how to make random 'password' again?
                    })
            )
    ])

How can I change the password value after clicking refresh (hintAction)
Solution
I use set and now it's working
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

toggle in input hint
FilamentFFilament / ❓┊help
10mo ago
$set on modal form hint action
FilamentFFilament / ❓┊help
13mo ago
Hint Action in V4
FilamentFFilament / ❓┊help
2mo ago
Reset form data in action
FilamentFFilament / ❓┊help
3y ago