This project is archived and is in readonly mode.

#2846 ✓resolved
Elliot Winkler

Form authenticity token in form tag should be set to display:inline

Reported by Elliot Winkler | June 28th, 2009 @ 08:29 AM | in 2.x

When a form is rendered using form_tag or form_for, the form authenticity token is of course placed right after the <form> tag automatically. While this is a hidden field so it won't show up, it is wrapped in a div tag that does not have display: inline set on it. This means that if you want your form to be inline, you have to set something like

form div { display: inline }

or else the form will have a line break where the form authenticity token hidden field is. However, because there's no way to target this exactly, if you happen to have any other divs in your form for whatever reason, you'll have to give those classes or something so you can override the display: inline in your CSS.

I don't actually know why the hidden field is wrapped in a div, maybe there's some reason, but I've made a patch that sets this div to display: inline.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages