Skip to content

mirven/uni-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniForm
=======

A plugin for generating forms using http://sprawsm.com/uni-form

Installation
============

./script/plugin install git://github.com/mirven/uni-form.git

Usage
=====

Include the Javascript file (probably in your layout):

<%= javascript_include_tag 'uni-form.prototype.js' %>

Include the stylesheet (again, probably in your layout):

<%= stylesheet_link_tag 'uni-form', :media => "all" %>	

Then, to create your form you can do the following:

<% uni_form_for :user do |form| %>
	<% form.fieldset :type => "block", :legend => "cool stuff" do %>
		<%= form.text_field :first_name, :required => true, :label => "Your first name" %>
		<%= form.text_field :last_name %>
	<% end %>
	<%= form.submit "save" %>
<% end %>