Agile Web Development

Build it. Launch it. Love it.

Simplified form helper

Will add three methods for each form helper - for example, for the text_field helper the following helpers will be generated:

  • text_field_with_label - same field with a label tag, the text for the label passed as the first argument

  • text_field_with_error - same field with the error message below, formatted into a div

  • text_field_with_label_and_error - same field with both the label and the error message, label text passed as the first argument

Such helpers become available for text fields, selects, file inputs and checkboxes. Checkboxes and radios will be wrapped into their labels so that it's easier to tick them on and off.

Allows you to do one-liners to construct the input widget.

Vitals

Repository http://julik.textdriven.com/svn/tools/rails_plugins/simplified_form/
License Rails' (MIT)
Tags Tag_red builder form helper
Rating (3 votes)
Owner Julik
Created 4 June 2006

Comments

  • timurv
    5 June 2006

    I think it need more examples and tests

  • Craig
    5 June 2006

    I believe the label for= should equal the DOM ID of the element, not the NAME. See: http://www.w3schools.com/tags/tag_label.asp

  • Avatar
    6 June 2006

    It has the tests that it needs, but examples might be nice indeed as well as the support for the form_for.

Add a comment