[html-formfu] Repeatable Date fields

Doug Orleans dougorleans at gmail.com
Mon Dec 14 03:43:37 GMT 2009


Still more things that don't work with Repeatable increment_field_names = 0:

use HTML::FormFu;

my $form = HTML::FormFu->new;
$form->elements({ type => 'Repeatable', increment_field_names => 0,
                 elements => [ { type => 'Date',
				 name => 'date',
			       } ] });

my $rep = $form->get_element;
$rep->repeat(2);

$form->process( { date_year => [ 1970, 2009 ],
		  date_month => [ 11, 12 ],
		  date_day => [ 10, 13 ]
		} );

print $form->param_list( 'date' ), "\n";

This prints "%d-%m-%Y".  And, if I set auto_inflate = 1, it prints
nothing at all.

Thanks,
--Doug Orleans
dougorleans at gmail.com



More information about the HTML-FormFu mailing list