# Rails form post creates a 'Do you want to download “\<form target\>”' prompt on mobile

**URL:** <https://discuss.rubyonrails.org/t/rails-form-post-creates-a-do-you-want-to-download-form-target-prompt-on-mobile/76331>\
**Category:** A May Of WTFs\
**Created:** [October 7, 2020, 11:48pm UTC](https://discuss.rubyonrails.org/t/rails-form-post-creates-a-do-you-want-to-download-form-target-prompt-on-mobile/76331 "2020-10-07T23:48:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![TensAndTwenties](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@TensAndTwenties](https://discuss.rubyonrails.org/u/TensAndTwenties)\
**Post date:** [October 7, 2020, 11:48pm UTC](https://discuss.rubyonrails.org/t/rails-form-post-creates-a-do-you-want-to-download-form-target-prompt-on-mobile/76331/1 "2020-10-07T23:48:39Z")

</div>

I’m just testing my first Rails app on mobile and whenever I submit a form I get a prompt to download the form target. See the screenshot below:

 ![IMG_3273.PNG](https://global.discourse-cdn.com/rubyonrails/original/2X/e/efa3118de7db7d97b11c611f82e50a718bca8d99.jpeg)

Here is my form tag for the form im working with:

```ruby
<%= form_with(url: "/stock/createOrderBuy",remote: true, method: "post", id: "buyForm", html: { class: "needs-validation", novalidate: true }) do %>

```

And here is the function on the back end the form is posting to. As you can see, it’s just supposed to receive a post and send no response or redirect the user:

```ruby
def createOrderBuy
        shares = params[:shares_buy][:number]
        type = params[:buyType]
        limit = 0 
        if params[:limitBuy][:limitPrice] != ""
            limit = params[:limitBuy][:limitPrice].to_f
        end
        stop = 0
        if params[:stopBuy][:stopPrice] != ""
            stop = params[:stopBuy][:stopPrice] .to_f
        end

        order = Order.create(typeId: type, quantity: shares, symbol: params[:symbolHidden], portfolioId: params[:portfolioIdHidden], processed: false, limit: limit, stop: stop, crypto: false, company_name: params[:companyHidden])
        puts "typeid = " + type.to_s

        if Stock.isMarketOpen && type.to_s == "1"

                quoteObj = StockQuote::Stock.new(api_key: 'API KEY HERE')
                stock = StockQuote::Stock.quote(order.symbol)
                latestPrice = stock.latest_price
                orderCost = (stock.latest_price.to_f*shares.to_f).round(2)
                order.cost = orderCost
                order.save
                #this will go in a processor later
                Stock.buyStock(latestPrice, order)
        end

    end

```

If anyone could advise me on how to prevent these popups in mobile on my rails app Id really appreciate it!

Using - Ruby on Rails 5.1.7, running in Safari on an iPhone8

---

_[View the full topic](https://discuss.rubyonrails.org/t/rails-form-post-creates-a-do-you-want-to-download-form-target-prompt-on-mobile/76331)._
