Skip Menu |

This queue is for tickets about the Catalyst-Controller-FormBuilder CPAN distribution.

Report information
The Basics
Id: 26894
Status: new
Priority: 0/
Queue: Catalyst-Controller-FormBuilder

People
Owner: Nobody in particular
Requestors: mromani [...] ottotecnica.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Addition to TT2 sample code.
I suggest including this small addition to the sample code provided in the POD, so that --- cpfb_orig.pm 2007-05-02 16:52:49.000000000 +0200 +++ cpfb_modified.pm 2007-05-02 16:52:33.000000000 +0200 @@ -259,6 +259,7 @@ [% formbuilder.start -%] <div id="form"> [% FOREACH field IN formbuilder.fields -%] + [% IF field.type != 'hidden' %] <p> <label> <span [% IF field.required %]class="required"[%END%]>[%field.label%]</span> @@ -271,6 +272,7 @@ [% END %] </p> [% END %] + [% END %] <div id="submit">[% formbuilder.submit %]</div> <div id="reset">[% formbuilder.reset %]</div> </div>
From: mromani [...] ottotecnica.com
I suggest including this small addition to the sample code provided in the POD, so that hidden fields are not displayed. (I pressed "Create" too eraly... ;-)
From: mromani [...] ottotecnica.com
Ok, I realized my patch actually suppressed hidden fields. This is bad. Now the new version of the patch: --- cpfb_orig.pm 2007-05-02 16:52:49.000000000 +0200 +++ cpfb_modified.pm 2007-05-02 17:37:32.000000000 +0200 @@ -259,6 +259,7 @@ [% formbuilder.start -%] <div id="form"> [% FOREACH field IN formbuilder.fields -%] + [% IF field.type != 'hidden' %] <p> <label> <span [% IF field.required %]class="required"[%END%]>[%field.label%]</span> @@ -270,6 +271,9 @@ </span> [% END %] </p> + [% ELSE %] + [% field.field %] + [% END %] [% END %] <div id="submit">[% formbuilder.submit %]</div> <div id="reset">[% formbuilder.reset %]</div>