Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable form class #108

Closed
wants to merge 1 commit into from
Closed

Conversation

zmack
Copy link
Contributor

@zmack zmack commented Nov 19, 2010

Currently, button_to's generated form element is hard coded to having the class "button_to".

This is somewhat inconvenient when trying to hook forms for ajax trickery, as the only class you control is the class of the submit element.

If, for instance, you've got several actions rendered as button_to, the only way to properly hook the submits would be to use 'form:has(.some-action-class)' selectors, which is quite convoluted.

This patch adds the :form_class modifier to button_to's html_options.

@chadoh
Copy link

chadoh commented Jan 21, 2011

This is great! I need it right now.

@spastorino
Copy link
Contributor

Applied thanks :)

@escobera
Copy link

Will this patch be available on 3.0.x versions?

vijaydev pushed a commit that referenced this pull request Sep 1, 2012
Default headers description
@rails rails deleted a comment from cloudflare-pages bot May 13, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants