Changeset 71 in text-formbuilder for trunk


Ignore:
Timestamp:
03/15/05 16:39:29 (20 years ago)
Author:
peichman
Message:

documented how to do blank labels on fields
changed !head from <h3> to <h2>
improved the default stylesheet (better looking fieldsets) and removed the <hr> from above the submit button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Text/FormBuilder.pm

    r70 r71  
    3232#author, #footer { font-style: italic; } 
    3333caption h2 { padding: .125em .5em; background: #ccc; text-align: left; } 
    34 fieldset { margin: 1em 0; } 
     34fieldset { margin: 1em 0; border: none; border-top: 2px solid #999; } 
    3535legend { font-size: 1.25em; font-weight: bold; background: #ccc; padding: .125em .25em; border: 1px solid #666; } 
    3636th { text-align: left; } 
    37 th h3 { padding: .125em .5em; background: #eee; } 
     37th h2 { padding: .125em .5em; background: #eee; font-size: 1.25em; } 
    3838th.label { font-weight: normal; text-align: right; vertical-align: top; } 
    3939td ul { list-style: none; padding-left: 0; margin-left: 0; } 
    40 .note { background: #eee; } 
     40.note { background: #eee; padding: .5em 1em; } 
    4141.sublabel { color: #999; } 
    4242.invalid { background: red; } 
     
    491491        TABLE_LINE: for my $line (@{ $$section{lines} }) { 
    492492            if ($$line[0] eq 'head') { 
    493                 $OUT .= qq[  <tr><th class="subhead" colspan="2"><h3>$$line[1]</h3></th></tr>\n] 
     493                $OUT .= qq[  <tr><th class="subhead" colspan="2"><h2>$$line[1]</h2></th></tr>\n] 
    494494            } elsif ($$line[0] eq 'note') { 
    495495                $OUT .= qq[  <tr><td class="note" colspan="2">$$line[1]</td></tr>\n] 
     
    543543    } 
    544544%> 
    545   <tr><td colspan="2"><hr /></td></tr> 
    546545  <tr><th></th><td style="padding-top: 1em;"><% $submit %></td></tr> 
    547546</table> 
     
    10031002    field_3|'\'Official\' title' 
    10041003 
     1004Quoted strings are also how you can set the label for a field to be blank: 
     1005 
     1006    unlabeled_field|'' 
     1007 
    10051008Now, back to the beginning. Form fields are each described on a single line. 
    10061009The simplest field is just a name (which cannot contain any whitespace): 
Note: See TracChangeset for help on using the changeset viewer.