9 Feb
2006
9 Feb
'06
2:47 p.m.
This issue stems from Killes' comment [ http://drupal.org/node/46306#comment-71971 ]. Should form field maxlengths be consistent with corresponding database field sizes or should unicode encoding be accounted for? Drupal has no way of knowing what the field size of the database is, and as such the forms api can't take that into account.
Achtually, php can get the complete properties of a mysql database/table/field ..including maximum field sizes ( mysql_field_len(), mysql_field_type() and mysql_field_flags() ), For postgres if's similar ( pg_field_size() ). So it must be possible for drupal to get to that information too. Regards, Lodewijk Evers http://www.ontwerpwerk.nl