Skip to content

Instantly share code, notes, and snippets.

@ocharles
Created January 26, 2009 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ocharles/53041 to your computer and use it in GitHub Desktop.
Save ocharles/53041 to your computer and use it in GitHub Desktop.
-- Create label elements. Supports custom classes
[%- INCLUDE 'forms/label.tt' for=form.field('Whatever') class="sparkly" -%]
[%- INCLUDE 'forms/label.tt' for="Your own string" class="standard html class spec" -%]
-- Display just an <input>, <select>, etc
-- You can specify a type on input.tt, even if you use for=form.field('...')
[%- INCLUDE 'forms/input.tt' for=form.field('Whatever') class="sparkly" -%]
[%- INCLUDE 'forms/label.tt' for="id-of-object" type="Whatever" class="more classes" -%]
-- Create a row with a label on the left, and a field on the right.
-- All parameters passed to both input.tt and label.tt except the classes will be cleared on the label
[%- INCLUDE 'forms/generic/row.tt' for=form.field('Foo') type="text" -%]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment