anchor.diff:              let message = sprintf "form: %s" form
               OK message
             else
  -            OK "") //(post_submit_errored_%s validation %s))
  +            OK (post_edit_errored_%s validation %s))
         ]""" page.AsVal page.AsVal page.AsFormVal page.AsFormVal page.AsFormType page.AsFormVal page.AsFormType page.AsFormVal "%A" page.AsVal page.AsFormVal
  -    | View      -> sprintf """let %s = GET >=> OK "todo" """ page.AsVal
  -    | List      -> sprintf """let list_%s = GET >=> OK "todo" """ page.AsVal
  +    | View      ->
  +      sprintf """let %s = GET >=> OK get_%s """ page.AsVal page.AsVal
  +    | List      ->
  +      sprintf """let list_%s = GET >=> OK get_list_%s""" page.AsVal page.AsVal
       | Jumbotron ->
         sprintf """let %s = GET >=> OK get_%s""" page.AsVal page.AsVal
  -    | Create    -> sprintf """let create_%s = GET >=> OK "todo" """ page.AsVal
  +    | Create    ->
  +      sprintf """let create_%s =
  +    choose
  +      [
  +        GET >=> OK get_create_%s
  +        POST >=> bindToForm %s (fun %s ->
  +          let validation = validate%s %s
  +          if validation = [] then
  +            let form = convert%s %s
  +            let message = sprintf "form: %s" form
  +            OK message
  +          else
  +            OK (post_create_errored_%s validation %s))
  +      ]""" page.AsVal page.AsVal page.AsFormVal page.AsFormVal page.AsFormType page.AsFormVal page.AsFormType page.AsFormVal "%A" page.AsVal page.AsFormVal
       | Submit    ->
         sprintf """let submit_%s =
       choose
  
positive.code: 
  let pad tabs field = sprintf "%s%s" (repeat "  " tabs) field
  
  let formatEditFields page (fields : Field list) tabs =
    fields
    |> List.map (fieldToPopulatedHtml page)
    |> List.map (pad tabs)
    |> List.reduce (fun field1 field2 -> sprintf "%s%s%s" field1 Environment.NewLine field2)
  
  let formatSubmitFields (fields : Field list) tabs =
    fields
    |> List.map fieldToHtml
    |> List.map (pad tabs)
    |> List.reduce (fun field1 field2 -> sprintf "%s%s%s" field1 Environment.NewLine field2)
  
  let formatSubmitErroredFields page (fields : Field list) tabs =
    fields
    |> List.map (fieldToErroredHtml page)
    |> List.map (pad tabs)
    |> List.reduce (fun field1 field2 -> sprintf "%s%s%s" field1 Environment.NewLine field2)
  
  let bannerViewTemplate (site : Site) (page : Page) =
    sprintf """
  let get_%s =
    base_html
  
negative.code:     ]
      scripts.common""" page.AsVal page.Name site.Name
  
  let viewTemplate site page =
    let rec viewTemplate site page pageMode =
      match pageMode with
      | CVEL      -> [Create; View; Edit; List] |> List.map (viewTemplate site page) |> flatten
      | Create    -> [createFormViewTemplate page; createErroredFormViewTemplate page] |> flatten
      | Edit      -> [editFormViewTemplate page; editErroredFormViewTemplate page] |> flatten
      | View      -> viewFormViewTemplate page
      | List      -> listFormViewTemplate page
      | Submit    -> [submitFormViewTemplate page; submitErroredFormViewTemplate page] |> flatten
      | Jumbotron -> jumbotronViewTemplate site page
  
    viewTemplate site page page.PageMode
  
  