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 Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)