Re: [Maypole] AsForm and textarea

From: Stephen Quinney (stephen at jadevine.org.uk)
Date: Sun Oct 17 2004 - 09:59:50 BST


On Sat, Oct 16, 2004 at 09:52:51PM -0400, Brian Glass wrote:
> to_field doesn't seem to work for me when the field is a large text
> field (e.g. text, or blob). It creates a <textarea> which is what I
> want, but it doesn't populate the <textarea> with data from the database.
>
> I looked at the code and discovered that on line 100 (near the end of
> to_field) it returns $class->_to_textarea($field) when in fact it should
> return $self->_to_textarea($field).

It looks to me like you are using version 2.2 (or earlier) of
CDBI::AsForm. The changelog for version 2.3 says:

2.3 Mon Jul 19 12:22:50 BST 2004
    - Patch from Randall Lucas to fix textarea breakage
    - The tests work too

A quick examination of the code does show that it is $self->_to_textarea
and not $class->_to_textarea that is being called in to_field().

So, the simple answer is, you need to upgrade your CDBI::AsForm module.

Stephen Quinney

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT