F
Filament5mo ago
Croco

How to show/hide text with delay?

Hey guys, I would like to show a message for a short time then hide it. I'm using Filament v3.
Placeholder::make('')
->content(function(){
return session()->has('otp_error') ? session()->get('otp_error') :
(session()->has('otp_success') ? session()->get('otp_success') : '');
})
->live()
->hiddenLabel(function(){
return !session()->has('otp_error') && !session()->has('otp_success');
}),
Placeholder::make('')
->content(function(){
return session()->has('otp_error') ? session()->get('otp_error') :
(session()->has('otp_success') ? session()->get('otp_success') : '');
})
->live()
->hiddenLabel(function(){
return !session()->has('otp_error') && !session()->has('otp_success');
}),
Thanks
0 Replies
No replies yetBe the first to reply to this messageJoin