From: Rafael Kitover Date: Sun, 7 Feb 2010 13:13:43 +0000 (+0000) Subject: update chapter 9 POD X-Git-Tag: v5.8005~46 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=9372a4db010f4d7d0478e8152474cae5943b2993 update chapter 9 POD --- diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod index 52225af..3419252 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod @@ -85,6 +85,11 @@ to use the FormFu base controller class: BEGIN {extends 'Catalyst::Controller::HTML::FormFu'; } +Don't forget to add: + + requires 'Catalyst::Controller::HTML::FormFu'; + +to your C. =head2 Add Action to Display and Save the Form diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod index 06aade6..1298e2b 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod @@ -77,6 +77,11 @@ from CPAN: It will install L as a prereq. +Also add: + + requires 'HTML::FormHandler::Model::DBIC'; + +to your C. =head1 HTML::FormHandler FORM CREATION @@ -94,6 +99,7 @@ to a form is only a couple of lines of code. Create the directory C. Create C: package MyApp::Form::Book; + use HTML::FormHandler::Moose; extends 'HTML::FormHandler::Model::DBIC'; use namespace::autoclean; @@ -218,7 +224,8 @@ The 'authors' relationship is a 'many-to-many' pseudo-relation, so this field can be set to Multiple to allow the selection of multiple authors and make it required: - has_field 'authors' => ( type => 'Multiple', required => 1 ); + has_field 'authors' => ( type => 'Multiple', label_column => 'last_name', + required => 1 ); Note: FormHandler automatically strips whitespace at the beginning or end of fields. If you want some other kind of stripping (or none) you can specify it explicitly.