[Catalyst] Re: Dumb question again:
nowCatalyst::Controller::FormBuilder
Stephen A Sykes
stephen at stephensykes.us
Wed Feb 27 04:32:17 GMT 2008
Peter Sørensen wrote:
> Maybe FormBuilder don't like:
>
> ......
> fields:
> name:
> name: Location name
> ......
>
> You use "name" as both field and object name. Just a guess.
>
> Regards
>
> Peter Sorensen/University of Southern Denmark/mail: maspsr at sdu.dk
>
>
> -----Oprindelig meddelelse-----
> Fra: Alex Povolotsky [mailto:tarkhil at over.ru]
> Sendt: 24. februar 2008 00:25
> Til: The elegant MVC web framework
> Emne: [Catalyst] Dumb question again: nowCatalyst::Controller::FormBuilder
>
> [info] *** Request 1 (1.000/s) [43248] [Sun Feb 24 02:05:17 2008] *** [debug] "GET" request for "location/add" from "89.222.147.9"
> [debug] Path is "location/add"
> [debug] Form (location/edit): Looking for config file location/edit.fb [debug] Form (location/edit): Found form config /usr/local/traffic/Traffic2/root/forms/location/edit.fb
> [error] Caught exception in Traffic2::C::Location->add "Can't use string
> ("location_edit") as a HASH ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.8.8/CGI/FormBuilder/Source/File.pm line 150."
> [info] Request took 0.014863s (67.281/s)
>
>
> CGI::FormBulder, running on that file, yields no error
>
> File is simple
>
> name: location_edit
> method: post
> title: Location
> fields:
> name:
> name: Location name
> type: text
> size: 60
> required: 1
>
> descr:
> name: Location description
> type: textarea
> rows: 4
> cols: 60
>
> What has I done wrong?...
>
> Alex.
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
You should use "label" not "name"...
name: location_edit
method: post
title: Location
fields:
label: Location name
type: text
size: 60
required: 1
descr:
label: Location description
type: textarea
rows: 4
cols: 60
More information about the Catalyst
mailing list