Skip to content

Instantly share code, notes, and snippets.

@Ameeda
Created April 28, 2011 19:38
Show Gist options
  • Save Ameeda/947147 to your computer and use it in GitHub Desktop.
Save Ameeda/947147 to your computer and use it in GitHub Desktop.
TIPS for using Form Helpers
Based on my e-mail discussion with SNUGGS & reading Rails Guides, here are some helpful tips to keep in mind when using form helpers:
-First define the input elements you want/need as well as the functional purpose of including them.
-Then, pick the helper that best serves that goal.
Examples:
- When I want to accept a string for my object it's usually a textbox.
- When that information is pretty lengthy (e.g. paragraphs) I probably need a textarea.
- When I want to restrict a selection group to one I'd probably use a radiobutton
- When I want to have multiple selections within a selection group I probably want a checkbox
@snuggs
Copy link

snuggs commented Apr 29, 2011

And don't forget the submit button helper :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment