#forms
6 posts tagged forms. Clear filter
-
Rails Style Params in Python and Flask
Ruby on Rails does a great job of parsing arrays in form data and populating a params hash, for quick and easy access in your controllers. For instance <input name="item[]" value="item 1"/ <input...
-
Using Formtastic to Cleanly Create Nice Looking Forms in Rails
Forms can easily get cluttered when you're dealing with a lot of form fields... er, ERB tags. I've written about extending Rails form builders, which certainly goes along way to shrinking your...
-
Extending Rails Form Builders
Extending forms in Rails is simple and will greatly reduce the amount of code in your views. This example is taken right from the Agile Web Development book on Rails(2.1.\) with one minor tweak. I...
-
Trouble Using Attr_Accessor in Rails Models and Forms
You might use the attr\accessible method to create getters and setters for a class that has attributes which don't map directly to corresponding fields in a database. For example let's take the...
-
Nested Attributes in a Form for Has_One Model Association in Rails
Just for reference...
-
Using Prototype to Access Form Data
Prototype has a powerful API for accessing and manipulating the Document Object Model, A.K.A the DOM. The following code will let you interact with a simple web form. Suppose we have a form that...