I forgot to say that I use my own function to define the fields in the
custom form.

db.py:
db.define_table('a_table', Field('field_name', 'text', length=600))

controller:
def copyField(field):
   return Field(field.name, field.type, length=field.length)

form = SQLFORM.factory(copyField(db.a_table.field_name))


i.a.


On Jan 30, 7:45 pm, ionel <ionelanton...@gmail.com> wrote:
> Hello,
>
> With custom form I can do this "form.table.field_name.length" and I
> get the field length defined in model file, ex. Field('field_name',
> 'text', length=200)
>
> But for length > 255, ex. Field('field_name', 'text', length=600), I
> get always 255 in form.table.field_name.length
>
> I use MySQL and I know that the max value for the data types CHAR and
> VARCHAR is 255, but for TEXT is 65535 characters. I think this is a
> bug.
>
> Thanks,
>
> i.a.

Reply via email to