[html-formfu] self.form.has_errors in TT templates
Steffen Schwigon
schwigon at webit.de
Tue Jan 15 13:28:44 GMT 2008
"Carl Franks" <fireartist at gmail.com> writes:
> On 15/01/2008, Steffen Schwigon <schwigon at webit.de> wrote:
>> Hi!
>>
>> I upgraded HTML::FormFu (0.02003) and
>> Catalyst::Controller::HTML::FormFu (0.02000).
>>
>> I use it with TT templates, regenerated the root/formfu files and
>> everything generally works.
>>
>> However, I'm somehow unable to find the replacement of something I did
>> before:
>>
>> [% IF self.form.has_errors %]
>> ...
>>
>> The has_errors() method works inside the Catalyst controller, but not
>> in the TT template (I need it in file "form").
>>
>> As a workaround I'm also not sure how to transport the result of
>> has_errors() from the Catalyst controller into the template in another
>> way.
>
> It's fixed now
Thanks.
> - it's not strictly necessary because "self" in the
> form template is the form, so "self.form" is a bit redundant - but
> anyway, I've fixed it in svn so it'll work.
Ah, I understand.
> I'm hoping to get another cpan release out in the next week or so.
Great.
> btw, just checking that you know that HTML-FormFu doesn't use the
> template files by default any more - you need to set
> $form->render_method('tt') to use the template files.
Yep. I knew and did that.
Works very well, like before.
Thanks. I love the speed of your responsiveness. :-)
Steffen
--
Steffen Schwigon <schwigon at webit.de>
Dresden Perl Mongers <http://dresden-pm.org/>
Deutscher Perl-Workshop <http://www.perl-workshop.de/>
More information about the HTML-FormFu
mailing list