Catalyst::Controller::FormBuilder view does not render input fields
I'm trying to use the example view in CPAN for Catalyst::Controller::FormBuilder, which looks like this:
<!-- root/src/books/edit.tt -->
<head>
<title>[% formbuilder.title %]</title>
[% formbuilder.jshead %]<!-- javascript -->
</head>
<body>
[% formbuilder.start -%]
<div id="form">
[% FOREACH field IN formbuilder.fields -%]
<p>
<label>
<span [% IF field.required %]class="required"[%END%]>[%field.label%]</span>
</label>
[% field.field %]
[% IF field.invalid -%]
<span class="error">
Missing or invalid entry, please try again.
</span>
[% END %]
</p>
[% END %]
<div id="submi开发者_如何转开发t">[% formbuilder.submit %]</div>
<div id="reset">[% formbuilder.reset %]</div>
</div>
</div>
[% formbuilder.end -%]
</body>
The problem is I do get the field labels, but not the input fields, on my page: did anybody had this problem, before?
I found the issue: there is an error in the docs:
[% field.field %]
should read as
[% field.tag %]
...
精彩评论