X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F09_AdvancedCRUD%2F09_FormFu.pod;h=a566e925fce68a6a5104bbea7e4829cf916e154d;hp=732165ae9f80ddbb142700a9d70d865b550cdcc0;hb=2217b252905d370f4f7840cf78996d43c79e5d4f;hpb=aeaa7db5ec678d87f39c7e27f4c1fc7a95c6af56 diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod index 732165a..a566e92 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod @@ -56,27 +56,27 @@ L =head1 DESCRIPTION -This portion of the tutorial explores L and +This portion of the tutorial explores L and how it can be used to manage forms, perform validation of form input, as well as save and restore data to/from the database. This was written using HTML::FormFu version 0.05001. See -L +L for additional form management options other than -L. +L. =head1 HTML::FormFu FORM CREATION -This section looks at how L can be used to +This section looks at how L can be used to add additional functionality to the manually created form from Chapter 4. =head2 Inherit From Catalyst::Controller::HTML::FormFu First, change your C to inherit from -L +L by changing the C line from the default of: BEGIN {extends 'Catalyst::Controller'; } @@ -136,14 +136,14 @@ following method: } # Set the template - $c->stash->{template} = 'books/formfu_create.tt2'; + $c->stash(template => 'books/formfu_create.tt2'); } =head2 Create a Form Config File Although C supports any configuration file handled by -L, most people tend to use YAML. First +L, most people tend to use YAML. First create a directory to hold your form configuration files: mkdir -p root/forms/books @@ -278,7 +278,7 @@ performing any validation. =head1 HTML::FormFu VALIDATION AND FILTERING -Although the use of L in the previous section +Although the use of L in the previous section did provide an automated mechanism to build the form, the real power of this module stems from functionality that can automatically validate and filter the user input. Validation uses constraints to be sure that @@ -393,13 +393,13 @@ C and C options in C. =item * Constraints are added to provide validation of the user input. See -L for other +L for other constraints that are available. =item * A variety of filters are run on every field to remove and escape -unwanted input. See L +unwanted input. See L for more filter options. =back @@ -473,7 +473,7 @@ bottom: } # Set the template - $c->stash->{template} = 'books/formfu_create.tt2'; + $c->stash(template => 'books/formfu_create.tt2'); } Most of this code should look familiar to what we used in the @@ -580,12 +580,12 @@ Or you can proceed to write your own application, which is probably the real reason you worked through this Tutorial in the first place. -=head2 Config::General Config for this tutorial +=head2 Config::General Config for this tutorial If you are having difficulty with YAML config above, please save the below into the file C and delete the C file. The below is in -L format which follows the syntax of +L format which follows the syntax of Apache config files. constraints Required @@ -638,9 +638,13 @@ Apache config files. Kennedy Clark, C -Please report any errors, issues or suggestions to the author. The -most recent version of the Catalyst Tutorial can be found at +Feel free to contact the author for any errors or suggestions, but the +best way to report issues is via the CPAN RT Bug system at +. + +The most recent version of the Catalyst Tutorial can be found at L. -Copyright 2006-2008, Kennedy Clark, under Creative Commons License -(L). +Copyright 2006-2010, Kennedy Clark, under the +Creative Commons Attribution Share-Alike License Version 3.0 +(L).