Changeset 56 in text-formbuilder for trunk/lib/Text/FormBuilder


Ignore:
Timestamp:
01/13/05 15:00:25 (20 years ago)
Author:
peichman
Message:

single-line textfields can be given a maxlength

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Text/FormBuilder/grammar

    r55 r56  
    1919        $list_var, 
    2020        $size, 
     21        $maxlength, 
    2122        $rows, 
    2223        $cols, 
     
    157158        $$field{cols} = $cols if defined $cols; 
    158159        $$field{size} = $size if defined $size; 
     160        $$field{maxlength} = $maxlength if defined $maxlength; 
    159161         
    160162        #warn "[$thisline] field $item{name}; context $context\n"; 
     
    171173        $rows = undef; 
    172174        $cols = undef; 
     175        $maxlength = undef; 
    173176        @options = (); 
    174177         
     
    181184field_size: '[' ( row_col | size ) ']' 
    182185 
    183 size: /\d+/ 
    184     { $size = $item[1] } 
     186size: /\d+/ bang(?) 
     187    { $maxlength = $item[1] if $item[2][0]; $size = $item[1] } 
     188 
     189bang: '!' 
    185190 
    186191row_col: /\d+/ /,\s*/ /\d+/ 
Note: See TracChangeset for help on using the changeset viewer.