Changeset 68 in text-formbuilder for trunk/lib


Ignore:
Timestamp:
03/14/05 14:22:20 (20 years ago)
Author:
peichman
Message:

BUGFIX: option list items had an inadvertant minimum length of 2
cleaned up 'required' option handling

Location:
trunk/lib/Text
Files:
2 edited

Legend:

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

    r67 r68  
    251251            } 
    252252        } 
    253     }     
    254      
    255     # remove false $$_{required} params because this messes up things at 
    256     # the CGI::FormBuilder::field level; it seems to be marking required 
    257     # based on the existance of a 'required' param, not whether it is 
    258     # true or defined 
    259     # TODO: check if this is still needed 
    260     $$_{required} or delete $$_{required} foreach @{ $self->{form_spec}{fields} }; 
     253    } 
    261254     
    262255    # assign the field names to the sections 
  • trunk/lib/Text/FormBuilder/grammar

    r66 r68  
    173173            list     => $list_var, 
    174174            validate => $item{'validate(?)'}[0], 
    175             required => $required || 0, 
     175            required => $required, 
    176176        }; 
    177177         
     
    191191         
    192192        $type = undef; 
    193         $required = 0; 
     193        $required = undef; 
    194194        $list_var = undef; 
    195195        $size = undef; 
     
    233233 
    234234# for simple multiword values not involving punctuation 
    235 simple_multiword: <skip:''> /\w[\w\t ]+/ { $item[2] } 
     235simple_multiword: <skip:''> /\w[\w\t ]*/ { $item[2] } 
    236236 
    237237# my attempt at a single-quoted, non-interpolating string 
Note: See TracChangeset for help on using the changeset viewer.