From: Dennis Roberts Date: 2004-12-22T07:43:56+09:00 Subject: html form generation problems I think I must be doing something wrong. I am attempting to generate a form which values from existing data. Here is a simplified version of what I am trying to do (see below). I don't get a form element with this, I get something like:
onetwothree
I also notice the HEAD and TITLE tags are missing. Any advice? #!/usr/bin/ruby -w require 'cgi' cgi = CGI.new("html3") ary = %w( one two three ) cgi.out do cgi.html do cgi.head do cgi.title("Form Test") end cgi.body do cgi.form do ary.each do |value| cgi.text_field(value, value) end end end end end