# Hotwire native - Dismiss modal and use redirect for screen below the modal

**URL:** https://discuss.hotwired.dev/t/hotwire-native-dismiss-modal-and-use-redirect-for-screen-below-the-modal/6151
**Category:** General
**Created:** [January 2, 2025, 5:20pm UTC](https://discuss.hotwired.dev/t/hotwire-native-dismiss-modal-and-use-redirect-for-screen-below-the-modal/6151 "2025-01-02T17:20:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DimitarSpiroskiAtPW](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/dimitarspiroskiatpw/32/3986_2.png) [@DimitarSpiroskiAtPW](https://discuss.hotwired.dev/u/DimitarSpiroskiAtPW)
#### Post date: [January 2, 2025, 5:20pm UTC](https://discuss.hotwired.dev/t/hotwire-native-dismiss-modal-and-use-redirect-for-screen-below-the-modal/6151/1 "2025-01-02T17:20:56Z")

</div>

Hello, what is the best way to submit a form in a modal and then redirect the screen below the modal?

For example, I have a /customers route that renders in a default context. On it I have a link to /customers/filter that renders in a modal. This route renders a form form with action=/customers. When I submit that form the app stacks a new /customers?query=… scren on top of the initial /customers screen.

![screen-recording](https://canada1.discourse-cdn.com/flex027/uploads/stimulusjs/original/2X/2/20172f039d6ea2034875d4b4d538285ae427af9e.gif)

---

<div class="post-metadata">

### Author: ![ibrahima](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/ibrahima/32/3940_2.png) [@ibrahima](https://discuss.hotwired.dev/u/ibrahima)
#### Post date: [January 5, 2025, 2:41am UTC](https://discuss.hotwired.dev/t/hotwire-native-dismiss-modal-and-use-redirect-for-screen-below-the-modal/6151/2 "2025-01-05T02:41:27Z")

</div>

I haven’t tried this myself, but can you use presentation=replace to do that as described here? It sounds like it should do what you want.

> **[Hotwire Native Reference: Navigation](https://native.hotwired.dev/reference/navigation#routing)**
>
> How to navigate between screens with Hotwire Native.

---

<div class="post-metadata">

### Author: ![DimitarSpiroskiAtPW](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/dimitarspiroskiatpw/32/3986_2.png) [@DimitarSpiroskiAtPW](https://discuss.hotwired.dev/u/DimitarSpiroskiAtPW)
#### Post date: [January 8, 2025, 9:13am UTC](https://discuss.hotwired.dev/t/hotwire-native-dismiss-modal-and-use-redirect-for-screen-below-the-modal/6151/3 "2025-01-08T09:13:58Z")

</div>

Adding `data-turbo-action="replace"` actually works exactly as desired in my description. When I first tried it before I posted, I’ve made a typo so I thought it just doesn’t work. However, after trying it again I can see it works perfectly now.
