A little ruby on rails plugin containing a form builder that uses css to produce tableless form.
File app/views/customers/_form.rhtml:
<%= error_messages_for 'customer' %>
<!--[form:customer]-->
<% fieldset_tag 'General data' do %>
<%= @f.text_field :code, :class=>'half-size' %>
<%= @f.text_field :name, :class=>'double-size' %>
<br />
<%= @f.select(:bank_id, Bank.to_select, {:include_blank => true}, {:class=>'normal-size'} ) %>
<%= @f.check_box :option1 %>
<%= @f.hidden_field :field1 %>
<% end %>
<!--[eoform:customer]-->
File app/views/customers/new.rhtml:
<% css_form_for :customer, @customer, :url => { :action => "create" } do |@f| %>
<%= render :partial => 'form' %>
<%= submit_tag 'Create' %>
<% end %>
File app/views/customers/edit.rhtml:
<% css_form_for :customer, @customer, :url => { :action => 'update', :id => @customer } do |@f| %>
<%= render :partial=> 'form' %>
<%= submit_tag 'Edit' %>
<% end %>
File app/views/customers/show.rhtml:
<% css_show_for :customer, @customer, do |@f| %>
<%= render :partial=> 'form' %>
<% end %>
Download [cssFormplugin]
script/plugin install svn://rubyforge.org/var/svn/cssformbuilder/trunk
After installation:
MIT
For info about this plugin, write to: addsw.it [at] gmail.com
Copyright (c) 2006-2008 AD.D. Software