Sha256: a204f0bcb2328277fb44ea326be3c5a4a1fc6223119bf80cfe624b0a3c9d4de1

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

# Formatted Form
Author: [The Working Group](http://www.theworkinggroup.ca)

---

## What is it?

A Rails form builder to simplify your forms and keep your views clean.
  
  
## Install

### 1. Add the gem definition to your Gemfile:
    
    config.gem 'form_builder'
    
### 2. From within your Rails project run:
    
    bundle install

### 3. Generate the javascript file

    rails g formatted_form:javascripts

This will create `public/javascripts/formatted_form.js` and you should load it using:
  
    javascript_include_tag 'formatted_form'

### 4. (Optionaly) generate the stylesshet (SASS) file

    rails g formatted_form:stylesheets

This will create `app/views/stylesheets/formatted_form.sass` and you can move it to wherever you keep your SASS files and load it using:

    stylesheet_link_tag 'formatted_form'



## Usage (with haml)

    = formatted_form_for @session_user, :url => login_path do |f|
      = f.text_field :email, :label => 'Email address'
      = f.password_field :password
      = f.check_box :remember_me, :label => 'Remember me when I come back'
      = f.submit 'Log In', :change_to_text => 'Logging you in ...', :image => true
  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
formatted_form-1.1.0 README.md
formatted_form-1.0.2 README.md