Changeset 14 in text-formbuilder for trunk/lib/Text/FormBuilder.pm
- Timestamp:
- 10/22/04 16:37:16 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder.pm
r12 r14 87 87 } 88 88 89 ## #TODO: option switch for this 90 ## #TODO: goes with CGI::FormBuilder 2.13 91 ## foreach (@{ $self->{form_spec}{fields} }) { 92 ## $$_{ulist} = 1 if $$_{type} and $$_{type} =~ /checkbox|radio/ and @{ $$_{options} } >= 3; 93 ## } 89 foreach (@{ $self->{form_spec}{fields} }) { 90 $$_{ulist} = 1 if defined $$_{options} and @{ $$_{options} } >= 3; 91 } 94 92 95 93 $self->{form} = CGI::FormBuilder->new( … … 107 105 }, 108 106 data => { 109 headings => $self->{form_spec}{headings}, 110 author => $self->{form_spec}{author}, 107 headings => $self->{form_spec}{headings}, 108 author => $self->{form_spec}{author}, 109 description => $self->{form_spec}{description}, 111 110 }, 112 111 }, … … 138 137 my $title = $self->{form_spec}{title} || ''; 139 138 my $author = $self->{form_spec}{author} || ''; 139 my $description = $self->{form_spec}{description} || ''; 140 140 my $headings = Data::Dumper->Dump([$self->{form_spec}{headings}],['headings']); 141 141 my $fields = Data::Dumper->Dump([ [ map { $$_{name} } @{ $self->{form_spec}{fields} } ] ],['fields']); … … 176 176 headings => $headings, 177 177 author => q[$author], 178 description => q[$description], 178 179 }, 179 180 }, … … 229 230 th h2 { padding: .125em .5em; background: #eee; } 230 231 th.label { font-weight: normal; text-align: right; vertical-align: top; } 232 td ul { list-style: none; padding-left: 0; margin-left: 0; } 231 233 </style> 232 234 </head> … … 235 237 <h1><% $title %></h1> 236 238 <% $author ? qq[<p id="author">Created by $author</p>] : '' %> 239 <% $description ? qq[<p id="description">$description</p>] : '' %> 237 240 ] . $self->_form_template . q[ 238 241 <hr />
Note: See TracChangeset
for help on using the changeset viewer.