Option to show password field
Hey,
how can I make the TextInput::make()->password show the password on user request (the classic password-toggle)? I know how to achieve this with AlpineJS normally, but not in the context of filament.
Solution:Jump to solution
It's not possible out of the box last time a checked, there is a PR under review for added hidden / reveal ability to textinputs
12 Replies
Solution
It's not possible out of the box last time a checked, there is a PR under review for added hidden / reveal ability to textinputs
Thanks.
@awcodes Thanks for your response. But that does not do it directly in the browser. It has a full trip to the server, doesn't it?
Yes. But this is the easiest way to accomplish it. 🙂
I think I have seen a password field plugin from the author of the PR
i tried this, but this method only can show the password, but it cant hide back the password
Use
$component->getType
(could be a different method name), to first get the current type and then set the new type accordingly
i tried this, still same
Weird, why the value of getType() doesn't seem to be updated...
Not the most ideal but you can have to actions, one to hide and one to show
https://github.com/phpsa/filament-password-reveal im using this package
GitHub
GitHub - phpsa/filament-password-reveal
Contribute to phpsa/filament-password-reveal development by creating an account on GitHub.
thank you for this package, its worked