9 Replies
the objective is to show an alert confirmation to the user if the name contains a specific string
i think the closure you can pass into
requiresConfirmation()
is there to evaluate if the action needs confirmation or not. it's not meant to evaluate the action's form data
if you leave the parameter of requiresConfirmation()
blank you can see that it triggers a confirmation modal rendering the form
so imo it is not intended to retrieve the action's form input and require an additional confirmation for this inputI am not sure you can use
->form()
and ->requiresConfirmation()
at the same time.it seems that you can do so, but the result is a requires confirmation modal containing the form
when you confirm the modal, the result of the form is available in the
->action()
method. but there is no additional confirmation required based on the form inputYes, that's what I mean. They are using the same modal.
maybe form validation or notifications can be a help in this use case
oh, so is not possible to achieve? :/ hmmm
yeah but is not actually a validation, cuz technically there is no errors, but only an alert to let the user know that a song is named like that aswell
and using notifications π€ ... well when the notification will be shown?
i think i when i get inside the action, check if the name already exists and popup a notification? but i think will be like z-indexed under the modal (not sure yet, have to test it out), but yeah ill find a workaround
cuz technically there is no errors, but only an alert to let the user know that a song is named like that aswellThat sounds exactly like a
unique
validation π
but i mean, its ok that there is 2 songs with the same name, maybe they are from diferent artists
i just want to let the user know that there is already a song with that name