+ $beer->to_field('brewery', { column_nullable => 1 });
+
+=item r or request -- the Mapyole request object
+
+=item uri -- uri for a link , used in methods such as _to_link_hidden
+
+ $beer->to_field('brewery', 'link_hidden',
+ {r => $r, uri => 'www.maypole.perl.org/brewery/view/'.$beer->brewery});
+ # an html link that is also a hidden input to the object. R is required to
+ # make the uri unless you pass a uri
+
+=item order_by, constraint, join
+
+These are used in making select boxes. order_by is a simple order by clause
+and constraint and join are hashes used to limit the rows selected. The
+difference is that join uses methods of the object and constraint uses
+static values. You can also specify these in the relationship definitions.
+See the relationships documentation of how to set arbitrayr meta info.
+
+ BeerDB::LondonBeer->has_a('brewery', 'BeerDB::Brewery',
+ order_by => 'brewery_name ASC',
+ constraint => {location => 'London'},
+ 'join' => {'brewery_tablecolumn => 'beer_obj_column'},
+ );
+
+=item no_hidden_constraints --
+
+Tell AsForm not to make hidden inputs for relationship constraints. It does
+this sometimes when making foreign inputs. However, i think it should not
+do this and that the FromCGI 's _create_related method should do it.
+
+=back
+
+=head2 to_cgi
+
+ $self->to_cgi([@columns, $args]);
+
+This returns a hash mapping all the column names to HTML::Element objects
+representing form widgets. It takes two opitonal arguments -- a list of
+columns and a hashref of hashes of arguments for each column. If called with an object like for editing, the inputs will have the object's values.
+
+ $self->to_cgi(); # uses $self->columns; # most used
+ $self->to_cgi(qw/brewery style rating/); # sometimes
+ # and on rare occassions this is desireable if you have a lot of fields
+ # and dont want to call to_field a bunch of times just to tweak one or
+ # two of them.
+ $self->to_cgi(@cols, {brewery => {
+ how => 'textfield' # too big for select
+ },
+ style => {
+ column_nullable => 0,
+ how => 'select',
+ items => ['Ale', 'Lager']
+ }
+ });