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_FormHandler.pod;h=1298e2b55be9449861c4a301d41ae94c84a30c2c;hp=06aade652a3c1021845310acab69321ff45eabe1;hb=9372a4db010f4d7d0478e8152474cae5943b2993;hpb=96a8735673ba59a0cdc20672020dffab4d6209de 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.