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
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
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,