[html-formfu] setting default values

Ascii King tech at swattermatter.com
Thu Oct 15 12:42:10 GMT 2009


Moritz Onken wrote:
> From a first glance:
>
> $c->stash->{object} is not a formfu object but a DBIC row.
> You might want to try $c->stash->{form}
>
> cheers
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>

Thanks, Moritz.  Changing that line changes the error.

$c->stash->{form}->model->default_values( { name => "tbz" } );
$c->stash->{form}->process();

|"Can't call method "can" on unblessed reference at /usr/local/share/perl/5.8.8/HTML/FormFu/Model/DBIC.pm line 198."|


Is it because the form isn't created until the process() is called? Does 
anyone have some complete examples of loading default values? I have 
looked through the tests, but they all use the same format and it isn't 
working for me.



More information about the HTML-FormFu mailing list