--- trunk/lib/Frey/Action.pm 2008/11/25 00:26:15 507 +++ trunk/lib/Frey/Action.pm 2008/11/25 01:00:16 509 @@ -135,12 +135,20 @@ } elsif ( $attr_type !~ m{^(Str|Int)$} ) { $value_html = qq||; } + $value = $attr->default( $name ) if ! $value && $attr->has_default; $label_title = qq| title="| . $attr->documentation . qq|"| if $attr->has_documentation; $default->{$name} = $value unless defined $default->{$name}; - $value_html = qq|| unless $value_html; + if ( ! $value_html ) { + my $suffix = ''; + if ( $attr_type =~ m{^Bool$} ) { + $type = 'checkbox'; + $suffix = ' checked' if $value; + } + $value_html = qq||; + } # warn "# required $name ", $class->meta->get_attribute( $name )->dump( 2 ); $form .= qq|| . $value_html;