Tabular Form Builder plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://svn.rubaidh.com/plugins/trunk/form_builders
To make it work, you’d do something along the lines of:
<% tabular_form_for('photograph', @photograph, :html => {:multipart => true}) do |f| %> <%= f.text_field 'title', :required => true %> <%= f.file_column_field 'file', :required => true %> <%= f.text_area 'description', :label => 'Longer description' %> <%= f.submit "Add" %> <% end %>
Notice how easy it was to create a form there, that will be styled consistently with all your other forms in your application? Nice. :-) I’ve added a couple of extra options. If you pass :required => true into a field, it’ll stick a ‘*’ next to the field (and in true convention-over-configuration form, that’s hard-coded, so tough :-P ). By default it will create a label by humanising the field name, but you can always pass in something more friendly with :label => 'Friendly field label'.
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, 10 months ago

