You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a form in a modal (don't judge me). I would like to submit the form, but there are validation errors with the submission, so I want to replace the form in the modal with one containing error messages.
Now I submit again, but this time I've fixed my validation issues and the response should redirect the entire page to a new url.
I'm using a <turbo-frame id="modal"> to contain the modal, and for the errors, <form data-turbo-frame="modal"> works brilliantly, but it would be great if I could determine different outcomes depending on the success of the submit.
I had some thoughts around whether adding other data-* attributes would work as a potential solution here. Eg data-turbo-frame-failure and data-turbo-frame-success might be used to direct the response at different targets depending on the result of the request.
Bramjetten, AvidRambo, trueinviso, feliperaul, yanshiyason and 2 more