Read more

How to fix strangely disappearing or misbehaving forms

Arne Hartherz
April 18, 2011Software engineer at makandra GmbH

You most likely have a form element inside another form element. Don't do that. Ever.

Illustration online protection

Rails professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
Read more Show archive.org snapshot

Firefox and Chrome will discard the first form nested inside another form (but for some reason keep others). Internet Explorer will possibly act like nothing is wrong -- but break (send the outer form) when you submit.

If your application behaves normal at first but removes forms from the DOM when you Ajax around, this could be the cause. Remember this note when you think your browsers are broken once again and check for such things thoroughly before heading into the depths of Rails or your application's logic.

Posted by Arne Hartherz to makandra dev (2011-04-18 20:20)