X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FAdvancedCRUD%2FFormFu.pod;h=98dd48773455a84bc63ea186b639915c394882d3;hp=36a2232a1d08b600adab8ed883bee4fdc77d60e4;hb=1fba23697704198d7ee72d0e3436f46c9bef537c;hpb=59d6a035fe3e35282ed23de210ec5a9beb1aa1a3 diff --git a/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod b/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod index 36a2232..98dd487 100644 --- a/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod @@ -202,6 +202,10 @@ following text: name: submit value: Submit +B Copying and pasting YAML from perl documentation is sometimes +tricky. See the L section of +this document for a more foolproof config format. + =head2 Update the CSS @@ -259,12 +263,12 @@ running) and restart it: $ script/myapp_server.pl -Login as C. Once at the Book List page, click the new -HTML::FormFu "Create" link at the bottom to display the form. Fill in -the following values: Title = "Internetworking with TCP/IP Vol. II", -Rating = "4", and Author = "Comer". Click Submit, and you will be -returned to the Book List page with a "Book created" status message -displayed. +Login as C (password: mypass). Once at the Book List page, +click the new HTML::FormFu "Create" link at the bottom to display the +form. Fill in the following values: Title = "Internetworking with +TCP/IP Vol. II", Rating = "4", and Author = "Comer". Click Submit, +and you will be returned to the Book List page with a "Book created" +status message displayed. Also note that this implementation allows you to can create books with bogus information. Although we have constrained the authors with the @@ -383,6 +387,10 @@ to match: # The user cannot leave any fields blank - Required +B Copying and pasting YAML from perl documentation is sometimes +tricky. See the L section of +this document for a more foolproof config format. + The main changes are: =over 4 @@ -546,6 +554,63 @@ be returned to the book list with a "Book edited" message at the top in green. Experiment with other edits to various books. +=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 +Apache config files. + + constraints Required + + constraints SingleValue + + min 5 + max 40 + type Length + message Length must be between 5 and 40 characters + + filter TrimEdges + filter HTMLEscape + name title + type Text + label Title + + title Enter a book title here + + + + constraints SingleValue + constraints Integer + filter TrimEdges + filter NonNumeric + name rating + type Text + label Rating + + title Enter a rating between 1 and 5 here + + + + constraints Integer + filter TrimEdges + filter HTMLEscape + name authors + type Select + label Author + multiple 1 + size 3 + + + value Submit + name submit + type Submit + + indicator submit + + + =head1 AUTHOR Kennedy Clark, C @@ -556,4 +621,4 @@ L). - \ No newline at end of file +