2009/10/15 Ascii King <t...@swattermatter.com>: > 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} >> > > 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.
Ah, I thought at first you were using HTML::FormFu::Model::HashRef - but I see from the error message it's HTML::FormFu::Model::DBIC. I think you're really just wanting the core form method - not the method on model(): $form->default_values({ \%vals }); Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu