Changeset 66 in text-formbuilder for trunk/lib/Text/FormBuilder.pm


Ignore:
Timestamp:
03/11/05 15:17:59 (19 years ago)
Author:
peichman
Message:

worked on the rules for parsing lists in the grammar
allow end of field line comments
growable fields can specify a limit; e.g. "person*4" to limit to 4
use '+other' to specify that a field should have an 'Other' option (FB 3.02)
rearranged TODOs in the main documentation

File:
1 edited

Legend:

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

    r64 r66  
    77use vars qw($VERSION @EXPORT); 
    88 
    9 $VERSION = '0.09'; 
     9$VERSION = '0.10'; 
    1010@EXPORT = qw(create_form); 
    1111 
     
    241241        defined $$field{$_} or delete $$field{$_} foreach keys %{ $field }; 
    242242         
    243         unless ($FB_version >= '3.002') { 
    244             if ($$field{growable}) { 
    245                 warn '[' . (caller(0))[3] . "] growable fields not supported by FB $FB_version (requires 3.002)"; 
    246                 delete $$field{growable}; 
     243        unless ($FB_version >= '3.02') { 
     244            for (qw(growable other)) { 
     245                if ($$field{$_}) { 
     246                    warn '[' . (caller(0))[3] . "] '$_' fields not supported by FB $FB_version (requires 3.02)"; 
     247                    delete $$field{$_}; 
     248                } 
    247249            } 
    248250        } 
     
    509511                    $OUT .= qq[<th></th>]; 
    510512                } else { 
    511                     $OUT .= '<th class="label">' . ($$_{required} ? qq[<strong class="required">$$_{label}:</strong>] : "$$_{label}:") . '</th>'; 
     513                    $OUT .= '<th class="label">' . ($$_{required} ? qq[<strong class="required">$$_{label}</strong>] : "$$_{label}") . '</th>'; 
    512514                } 
    513515                 
     
    11601162=head1 TODO 
    11611163 
    1162 Document the commmand line tool 
     1164=head2 Documentation/Tests 
    11631165 
    11641166Document use of the parser as a standalone module 
     1167 
     1168Better tests! 
     1169 
     1170=head2 Language/Parser 
    11651171 
    11661172Allow renaming of the submit button; allow renaming and inclusion of a  
     
    11721178validate. These should cause C<build> to emit a warning before ignoring them. 
    11731179 
     1180C<!include> directive to include external formspec files 
     1181 
     1182=head2 Code generation/Templates 
     1183 
     1184Alternative format using C<< <fieldset> >> tags instead of C<< <h2> >> 
     1185section headers 
     1186 
    11741187Make the generated modules into subclasses of CGI::FormBuilder 
     1188 
     1189Better integration with L<CGI::FormBuilder>'s templating system 
    11751190 
    11761191Allow for custom wrappers around the C<form_template> 
     
    11781193Maybe use HTML::Template instead of Text::Template for the built in template 
    11791194(since CGI::FormBuilder users may be more likely to already have HTML::Template) 
    1180  
    1181 C<!include> directive to include external formspec files 
    1182  
    1183 Better tests! 
    11841195 
    11851196=head1 BUGS 
Note: See TracChangeset for help on using the changeset viewer.