epoch1 has asked for the wisdom of the Perl Monks concerning the following question:
At the top of my form template I have the following to set default values for values which could be null in element:my $rs = schema->resultset('Payment') ->find({id => route_parameters->get('code')}); template 'form', {'element' => $rs};
This doesn't work though. Even if the keys have values the DEFAULT values are applied. I did find this post http://www.perlmonks.org/?node_id=133377, but I still can't see what I'm doing wrong. I'm not looping through element I'm just printing each value out at different points in the template. Can anyone advise please?{{ DEFAULT element.email = 'email' element.price = '0' element.date = 'date' element.title = 'title' }}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template Toolkit DEFAULT for null hash value
by hippo (Archbishop) on May 07, 2016 at 17:32 UTC | |
by epoch1 (Acolyte) on May 08, 2016 at 15:25 UTC |