Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:09:10+00:00 2026-06-14T02:09:10+00:00

Edit – clearly no-one has any idea what is vexing me here. I think

  • 0

Edit – clearly no-one has any idea what is vexing me here. I think it’s just a matter of there being something that I’ve done elsewhere in the page that’s blocking the status attribute being sent. The problem is I just can’t see anything. I’m hoping someone has seen something similar and can suggest where I need to look.


I have a dummy form on my page to post data to my web-app. It is created in Rails (using HAML) like so;

=form_tag bulk_invoice_path(''), method: 'put', class: 'mark-sent-form' do
  =hidden_field_tag 'invoice[status]', 'Sent'

This generates the following html;

<form accept-charset="UTF-8" action="/bulk_invoices/" class="mark-sent-form" method="post">
  <div style="margin:0;padding:0;display:inline">
    <input name="utf8" type="hidden" value="&#x2713;" />
    <input name="_method" type="hidden" value="put" />
    <input name="authenticity_token" type="hidden" value="OU8GtbHycR/EJ+H3GG9MN59xI59v47LSaFc2wYZloAs=" />
  </div>
  <input id="invoice_status" name="invoice[status]" type="hidden" value="Sent" />
</form>

In the DOM, this appears as follows

<form accept-charset="UTF-8" action="/bulk_invoices/" class="mark-sent-form" method="post">
  <div style="margin:0;padding:0;display:inline">
    <input name="utf8" type="hidden" value="✓">
    <input name="_method" type="hidden" value="put">
    <input name="authenticity_token" type="hidden" value="OU8GtbHycR/EJ+H3GG9MN59xI59v47LSaFc2wYZloAs=">
  </div>
  <input id="invoice_status" name="invoice[status]" type="hidden" value="Sent">
</form>

This form is posted with jquery (using coffeescript) like so;

jQuery ->
  $('a.mark-sent').click -> updateBulkInvoices('.mark-sent-form')

updateBulkInvoices = (form) ->
  $(form).attr('action', "/bulk_invoices/#{checkedInvoices().get().join()}").submit()

This pattern has served me well with other actions but the ‘invoice[status]’ seems to be causing problems. When the form is submitted with jQuery the hidden field is not passed. I see the following in my Rails console;

Parameters: {"utf8"=>"✓", "authenticity_token"=>"+qW9kIih5l2j69w1LK2YfQ9mYQ7nKPDm5XgLZuKB4ic=", "id"=>"16"}

i.e. the invoice[status] field isn’t being passed with the form parameters. If I change the name of this field to anything else it works just fine, e.g.

=form_tag bulk_invoice_path(''), method: 'put', class: 'mark-sent-form' do
  =hidden_field_tag 'invoice[flatus]', 'sent'

gives me the following parameters in my console;

Parameters: {"utf8"=>"✓", "authenticity_token"=>"+qW9kIih5l2j69w1LK2YfQ9mYQ7nKPDm5XgLZuKB4ic=", "invoice"=>{"flatus"=>"sent"}, "id"=>"16"}

I see the same thing happening if I monitor the ‘network’ tab on Chrome’s developer tools so I don’t think it’s a Rails thing, it seems to be a browser issue. I get the same thing with Safari and Firefox as well though.

Is status some sort of magical reserved word in browser forms? What’s going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:09:12+00:00Added an answer on June 14, 2026 at 2:09 am

    I have not been able to reproduce the problem, but I suspect it is being caused by the Javascript when submitting the form. To debug this, you can do the following:

    1. Open the page in Chrome
    2. Right click the submit button, choose ‘inspect element’
    3. select the ‘sources’ tab.
    4. In the sources tab, find the source for the Javascript being called
      when you click submit. You will probably have to click on the
      teensy right arrow in the box beneath the ‘elements’ tab. Also, if
      the code has been uglified with all the line breaks removed, you can
      click on the ‘pretty print’ curly braces icon at the bottom of the
      page.
    5. Once you find the method, click on the line number next to it on the
      left. In the right pane you should see it appear under the
      “Breakpoints” section.
    6. Reload the page
    7. Click the submit button.

    This should bring you into the Javascript debugger paused on the submit action and you can then step through the code and see exactly what it is doing.

    I hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit :- for any one with a similar problem, there's a good article covering
Edit: Seems numerous people think this is a dumb idea, so I would appreciate
EDIT: I think I've worked something out. - This character - ’ - seems
Edit: Alternatively, if anybody has any other methods of implementing pinch zoom it would
EDIT: Here is the edited control file (control.ascx): <%@ Control Language=C# AutoEventWireup=true CodeFile=Sale.ascx.cs Inherits=Enmasse.Modules.Demo_Enmasse.Sale
Edit: I just moved my HTTPRequest code into the onCreate, and now all of
EDIT After staring at this for 2 days, I do see one issue. I
EDIT: More detail here. Basically if you 1. open a tab1 to url1 (GET
Edit: Updating post based on Martins comments below Hello, I'm just trying to get
EDIT: for those who come here with a similar problem, now i know this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.