Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-10-31 Thread Martin Rehak
Hi, thanks much for comments. I know there are number of ways how/where to set/define defaults from app code and there is large text written about it in Catalyst documentation. What I would expect to work at least is that database default is going to be propagated into the form from the schema

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-10-31 Thread LNATION .
Probs incorrect approach but it'll work before render => sub { unless ($_[0]->field('capacity')->value) { # mayb editing $_[0]->field('capacity')->value(1); } } On Mon, Oct 31, 2016 at 8:28 AM, Marc0 wrote: > Am 31.10.2016 um 09:15 schrieb

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-10-31 Thread Marc0
Am 31.10.2016 um 08:57 schrieb Martin Rehak: > has_field 'capacity' => (type => 'PosInteger', > #default => '1', > label => 'Kapacita'); maybe add a "lazy => 1" to your commented "default => '1'"? has_field q(capacity) => ( type=> q(PosInteger), lazy=> 1,