Hotwire Discussion

Data-turbo-action="replace" on form post - turbo-ios

Based on Support `data-turbo-action="..."` on Form Submits by seanpdoyle · Pull Request #231 · hotwired/turbo · GitHub I assumed data-turbo-action should work on forms, I’m trying to get various forms on turbo-ios to replace rather than advance but nothing seems to work. Anyone had any joy with this? e.g.

<%= form_for(@event, url: events_path, html: { data: { "turbo-action": "replace" }}) do |f| %>
<%= button_to event_path(@event), method: :delete, data: { confirm: 'Delete this event?' }, form: { "data-turbo-action": "replace" } do %>