How can I add a password confirmation to any action

Ex: If an admin wants to make an action, a card will pop up asking the admin to re-enter his password to confirm the action
10 Replies
Dan Harrin
Dan Harrin3y ago
Filament
Password confirmation action by Jeff Greco - Tricks - Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
LancelotGamer
LancelotGamerOP3y ago
Thank you so much Is it posable to add password confirmation to filament default actions Ex: EditAtion / CreateAction I did the same thing (Password confirmation action by Jeff Greco - Tricks - Filament) with the edit action but it redirects me to the edit form without asking me to enter the password
Dan Harrin
Dan Harrin3y ago
add a password field to the end of the form
LancelotGamer
LancelotGamerOP3y ago
Ok
LancelotGamer
LancelotGamerOP3y ago
Thank you so much
Karmendra
Karmendra3w ago
Hi I am trying to use this Trick in Filament V3, but unable to understand how to call this, I have two situations where I need password confirmation. 1. I have a ViewPage in a Resource and when User Clicks on View Action in Table. 2. I have a Modal View (no redirect, but a pop up on a page), I want to Password confirmation before the User can see the Modals content. in Resource Table function for modal view I am trying to use it as following, the password pop-up comes but the View Modal or Page action doesn't happen
->actions([
Tables\Actions\ViewAction::make(),
\App\Filament\Actions\PasswordAction::make('view')->action(static function (): void {})->icon('heroicon-m-eye'),
Tables\Actions\EditAction::make(),
])
->actions([
Tables\Actions\ViewAction::make(),
\App\Filament\Actions\PasswordAction::make('view')->action(static function (): void {})->icon('heroicon-m-eye'),
Tables\Actions\EditAction::make(),
])
Looks like community here is not very active. Anyone please share your knowledge, thanks.
toeknee
toeknee3w ago
It is very active. But people who offer their free time don't always have time to response to existing threads as they require reading.
toeknee
toeknee3w ago
Which will allow you to show one action which requires a password, that you make, then rendering an action showing the content

Did you find this page helpful?