[html-formfu] Date field and rendering a hidden field
Zbigniew Lukasiak
zzbbyy at gmail.com
Fri Feb 15 16:19:50 GMT 2008
This looks quite weird. When I render my form the hidden field does
not get it's value.
Here is the code:
use strict;
use warnings;
use HTML::FormFu;
my $form = HTML::FormFu->new;
$form->load_config_file( 'e.yml' );
$form->process( { first_instance_date_year => 2008 } );
my $ind = $form->get_all_element( { name => 'event_indicator' } );
$ind->default( 1 );
warn $ind->value;
warn $ind->render;
warn $ind->value;
__OUTPUT__
1 at form.t line 11.
<input name="event_indicator" type="hidden" value="" /> at form.t line 12.
1 at form.t line 13.
So it looks that the hidden field does have the value - but it is not
printed out when rendering. And it happens only after processing the
Date element.
The config file I use:
---
# render_method: tt
elements:
- label: first_instance_date
name: first_instance_date
type: Date
auto_inflate: 1
- name: event_indicator
type: Hidden
value : 1
id: Event
--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
More information about the HTML-FormFu
mailing list