How can show a modal message ?

Friends, how can I show a message in Modal here instead of a Notification?
Forms\Components\TextInput::make('email')
->email()
->required()
->unique(Guest::class, 'email', ignoreRecord: true)
->reactive()
->afterStateUpdated(function ($state, callable $set) {
$guest = Guest::where('email', $state)->first();
if($guest) {
$set('name', $guest->name);
$set('telephone', $guest->telephone);

// Show Modal here
\Filament\Notifications\Notification::make()
->title('¡Cuenta existente!')
->body('Esta cuenta ya está registrada en nuestro sistema.')
->seconds(5)
->danger()
->send();
}
})
->columnSpan(1),
Forms\Components\TextInput::make('email')
->email()
->required()
->unique(Guest::class, 'email', ignoreRecord: true)
->reactive()
->afterStateUpdated(function ($state, callable $set) {
$guest = Guest::where('email', $state)->first();
if($guest) {
$set('name', $guest->name);
$set('telephone', $guest->telephone);

// Show Modal here
\Filament\Notifications\Notification::make()
->title('¡Cuenta existente!')
->body('Esta cuenta ya está registrada en nuestro sistema.')
->seconds(5)
->danger()
->send();
}
})
->columnSpan(1),
My idea is to focus all the user's attention on the message that appears in the modal, i try with actions modal but is not working here! The message and Modal must be displayed in the context of creating a record
3 Replies
LeandroFerreira
You can use mountFormComponentAction https://x.com/leandrocfe/status/1849339500813566348
Leandro Ferreira (@leandrocfe) on X
💡Filament Tip: You can use registerActions([]) and mountFormComponentAction to display a confirmation modal directly on live form fields in the Form Builder 🔥
From An unknown user
Twitter
TranceCode
TranceCodeOP2w ago
Thank you for the tip bro @LeandroFerreira, it's working now!
TranceCode
TranceCodeOP2w ago
No description
Want results from more Discord servers?
Add your server