Changeset 63 in text-formbuilder for trunk/lib/Text/FormBuilder.pm
- Timestamp:
- 02/18/05 11:26:45 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder.pm
r61 r63 9 9 $VERSION = '0.09_02'; 10 10 @EXPORT = qw(create_form); 11 12 #$::RD_TRACE = 1; 11 13 12 14 use Carp; … … 17 19 my %DEFAULT_OPTIONS = ( 18 20 method => 'GET', 19 ## javascript => 1,20 21 keepextras => 1, 21 22 ); … … 226 227 } 227 228 228 # use the list for displaying checkbox groups229 # use columns for displaying checkbox fields larger than 2 items 229 230 foreach (@{ $self->{form_spec}{fields} }) { 230 231 if (ref $$_{options} and @{ $$_{options} } >= 3) { … … 535 536 $OUT .= qq[ <td><span class="fieldgroup">]; 536 537 $OUT .= join(' ', map { qq[<small class="sublabel">$$_{label}</small> $$_{field} $$_{comment}] } @group_fields); 537 $OUT .= " ] . $msg_invalid . q[" if $$_{invalid}; 538 #TODO: allow comments on field groups 539 $OUT .= " ] . $msg_invalid . q[" if grep { $$_{invalid} } @group_fields; 538 540 539 541 $OUT .= qq[ </span></td>\n]; … … 1162 1164 C<birthday_day>, and C<birthday_year>. 1163 1165 1166 You can also use groups in normal field lines: 1167 1168 birthday|Your birthday:DATE 1169 1170 The only (currently) supported pieces of a fieldspec that may be used with a 1171 group in this notation are name and label. 1172 1164 1173 =head2 Comments 1165 1174 … … 1175 1184 reset button 1176 1185 1177 Allow groups to be used in normal field lines something like this: 1178 1179 !group DATE { 1180 month 1181 day 1182 year 1183 } 1184 1185 dob|Your birthday:DATE 1186 Allow comments on group fields (rendered after the all the fields) 1186 1187 1187 1188 Pieces that wouldn't make sense in a group field: size, row/col, options,
Note: See TracChangeset
for help on using the changeset viewer.