Hotwire Native Bridge FORM Component let's you hide the HTML Submit
button on a form, and display a native Submit
button on the top-right corner of the screen.
It also disables
the submit button after it was clicked, so the user doesn't click it twice.
We will also add data-turbo-action="replace"
(instead of default "advance
) to the form, so that the modal dismissal works smoothly, and flash is displayed.
Finally, bridge_form_with
helper will make the form reusable!
Blogpost: [member-only link]
Episode source code: [member-only link]
0:00 How Bridge Form works
4:02 Add Bridge Form to a Rails app
6:47 Redirect and render flash
7:40 bridge_form_with helper