Skip to content

rendering form dynamically in bootstrap form through hotwire - turbo frames

Notifications You must be signed in to change notification settings

haswanthreddy/hotwire_bootstrap_modal_form

Repository files navigation

Form in modal implemented for book#edit in books/index.html.erb

in books_controller in edit action

  render turbo_stream: turbo_stream.replace("modal_form", partial: "books/form", locals: { book: @book })

this is rendering the form partial and in the turbo_frame whose id is modal_form and that id is inside modal body

  <div class="modal-body">
    <%= turbo_frame_tag "modal_form" %>
  </div>

About

rendering form dynamically in bootstrap form through hotwire - turbo frames

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published