Questions tagged [turbo-frames]

47 questions
2
votes
0 answers

Cannot submit form drawn by Rails Turbo Frame response

A form inside a turbo_frame is blocked from being submitted a second time. Both the current page and the form action are the same path. I see forms now have to redirect to a new location or return an error code: turbo/pull/39. I have a form on every…
rigyt
  • 2,219
  • 3
  • 28
  • 40
2
votes
1 answer

Rails + Hotwire: Why does my link disappear when I click it?

I'm trying to incorporate Hotwire/Turbo into an existing Rails application. I've added turbo frames to a simple edit page, but now when I click my back button, it disappears instead of taking me to target page. The link is a simple link_to "Back",…
aidan
  • 1,627
  • 17
  • 27
1
vote
0 answers

Bootstrap modal in rails automatically opens when going to the previous link

I've been following this video tutorial series in creating a Rails 7 app with Bootstrap v5.3 as CSS framework and Stimulus(Turbo) in javascript side. Basically, I want to have a bootstrap modal to render form, create resources and view resources…
1
vote
0 answers

Turbo Frame Error "Content Missing" before Authentication

I rebuilt this Cookie Consent Tutorial with Turbo Frame and it has some weird behaviour to it that I can't understand. On the home & sign in page (therefore pages, where the user is not logged in) "Content Missing" is rendered even though I can see…
1
vote
1 answer

Network response with nested turboframe linking to same page doing a full html request?

I have a nested turbo frame My controller is something like def landing_page @variable = params[:variable].present? ? params[:variable] : "hello" end The view for my landing page is: <%= turbo_frame_tag "outer" do %>
<%= @variable…
1
vote
0 answers

Rails, Turbo-frames, how to make turbo response just simply refresh the current view?

The situation: I have a form partial that I want to use in two separate pages. After submit I want to update another part of the page with the newly added items but those differ depending of which page I'm on. Hence I can't rely on one single…
JUlinder
  • 995
  • 1
  • 8
  • 19
1
vote
1 answer

Is there a way to add multiple new items using Rails Turbo Frames?

I am trying to link a button to insert a form for a new item. I want to be able to add a new form for each button click using turbo frames. I am having trouble incrementing the id of each frame so a new turbo frame is added instead of just replacing…
Brian
  • 11
  • 1
1
vote
2 answers

Hotwire rails app: redirect to external service fails

I am integrating discourse single sign on with hotwire rails application, everything works fine till redirection, when it redirects I see there is CORS issue browser, ofcourse its turbo request so it attempts to fetch response from give URL so it…
Vishal G
  • 1,521
  • 11
  • 30
0
votes
0 answers

Hotwire Turbo Frame in Django application stops django-bootstrap-datepicker-plus from showing

In my Django App I use a Turbo Frame in a DetailView. The Turbo Frame loads a form into the DetailView. This form has a datefield for which I use a Datepicker (django-bootstrap-datepicker-plus). If I call the form directly the Datepicker works just…
0
votes
0 answers

How to fix the "Content missing" error in turbo frame?

By default, the new.html.erb needs to show the content of public question partial. When clicking on the buttons, the button needs to show its associated contents dynamically (public question partial for public question button and private question…
0
votes
1 answer

How to submit a form without reloading turbo_frame_tag

Using tubro_frame in Rails, how to submit a form which is inside the turbo frame without reloading it? Sample code: <%= turbo_frame_tag "sample-frame" do %> <%= form_with(model: model, url: sample_p_url, method: :put) do |f| %> #other fields…
aldrien.h
  • 3,437
  • 2
  • 30
  • 52
0
votes
1 answer

How to override `turbo_frame_tag` method?

I'm using Ruby on Rails 7 with the Turbo Rails gem, which provides the turbo_frame_tag method. I would like to add default html data attributes to all the tags that are generated through turbo_frame_tag. That is, given the default data…
Backo
  • 18,291
  • 27
  • 103
  • 170
0
votes
0 answers

Rails + Turbo broadcast_replace_later

Help with Turbo Streams & Sidekiq. Example File with code execution here: https://github.com/dostaglou/Basket/blob/main/app/models/basket.rb I am working on an app and I am trying to use turbo_stream_from. Right now the code is using a callback to…
0
votes
0 answers

Handler for -related errors that displays custom error messages

I'm using Rails 7 and am thinking of implementing a handler for turbo frame-related errors that displays custom error messages. For example, I would like to display An error occurred, try later instead of the default Content missing message, maybe…
Backo
  • 18,291
  • 27
  • 103
  • 170
0
votes
1 answer

Lazy-loaded frame by using the same view template

At the bottom of a long web page (i.e. in a view template, say long_page.html.erb) I've some heavy content that slows down page loading. Because this heavy content is placed at the bottom of the page and because users do not always scroll to the…
Backo
  • 18,291
  • 27
  • 103
  • 170