Skip Menu |

This queue is for tickets about the HTML-FormHandler-Model-DBIC CPAN distribution.

Report information
The Basics
Id: 82507
Status: rejected
Priority: 0/
Queue: HTML-FormHandler-Model-DBIC

People
Owner: Nobody in particular
Requestors: chen.yack [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: form_generator.pl generate vchar type column to textarea is wrong !
I use form_generator.pl to generate the form , when it finished. i found that what column in my database table with type "Vchar" in the result Form class is `type => "Textarea"`, that's a misstake. I read the code , found you use this Module to do the work:HTML::FormHandler::Generator::DBIC, in the code : my %types = ( text => 'TextArea', int => 'Integer', integer => 'Integer', num => 'Number', number => 'Number', numeric => 'Number', ); this hash cause the problem. should you add a : vchar => 'input' ? :)
From: chen.yack [...] gmail.com
On Sun Jan 06 03:48:02 2013, chinaxing wrote: Show quoted text
> I use form_generator.pl to generate the form , when it finished. i
found Show quoted text
> that what column in my database table with type "Vchar" in the result > Form class is `type => "Textarea"`, that's a misstake. > > > I read the code , found you use this Module to do the > work:HTML::FormHandler::Generator::DBIC, > > in the code : > > my %types = ( > text => 'TextArea', > int => 'Integer', > integer => 'Integer', > num => 'Number', > number => 'Number', > numeric => 'Number', > ); > > > this hash cause the problem. > > should you add a : vchar => 'input' ? > > :)
sorry, it should be here: $type = 'TextArea' if defined($info->{size}) && $info->{size} > 60; :) help fix it!
The form generated by the form_generator.pl is just a starting place. It's not supposed to be the final form that you use. (There is no 'input' FormHandler field, by the way.) It's impossible to guess exactly what kind of fields a user is going to want for their columns. You also don't say how the column that you're complaining about is defined. For varchar(255) you probably would want a TextArea field, not a Text field, which is the default.