- Timestamp:
- 02/10/05 16:52:01 (20 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.PL
r55 r61 7 7 ## EXE_FILES => [ 'bin/fb.pl' ], 8 8 PREREQ_PM => { 9 CGI::FormBuilder => 2.13,9 CGI::FormBuilder => 3.001, 10 10 Parse::RecDescent => 1.94, 11 11 Text::Template => 1.44, -
trunk/lib/Text/FormBuilder.pm
r60 r61 17 17 my %DEFAULT_OPTIONS = ( 18 18 method => 'GET', 19 javascript => 0,19 ## javascript => 1, 20 20 keepextras => 1, 21 21 ); … … 231 231 $$_{columns} = int(@{ $$_{options} } / 8) + 1; 232 232 } 233 #$$_{ulist} = 1 if ref $$_{options} and @{ $$_{options} } >= 3;234 233 } 235 234 … … 1053 1052 1054 1053 This currently only works for single line text fields. 1055 1054 1055 To create a growable field, add a C<*> after the name (and size, if 1056 given). Growable fields have a button that allows the user to add a 1057 copy of the field input. Currently, this only works for C<text> and 1058 C<file> fields. Growable fields also require JavaScript to function 1059 correctly. 1060 1061 # you can have as many people as you like 1062 person*:text 1063 1056 1064 For the input types that can have options (C<select>, C<radio>, and 1057 1065 C<checkbox>), here's how you do it: … … 1212 1220 sections. 1213 1221 1222 And of course, to Nathan Wiger, for giving use CGI::FormBuilder in the 1223 first place. Thanks Nate! 1224 1214 1225 =head1 AUTHOR 1215 1226 -
trunk/lib/Text/FormBuilder/grammar
r59 r61 151 151 group_name: /%[A-Z_]+/ 152 152 153 field: name field_size(?) label(?) hint(?) type(?) default(?) option_list(?) validate(?)153 field: name field_size(?) growable(?) label(?) hint(?) type(?) default(?) option_list(?) validate(?) 154 154 { 155 155 my $field = { 156 156 name => $item{name}, 157 growable => ($item{'growable(?)'}[0] ? 1 : 0), 157 158 label => $item{'label(?)'}[0], 158 159 comment => $item{'hint(?)'}[0], … … 203 204 { $rows = $item[1]; $cols = $item[3] } 204 205 206 growable: '*' 207 205 208 label: '|' (simple_multiword | quoted_string) { $item[2] } 206 209
Note: See TracChangeset
for help on using the changeset viewer.