[html-formfu] Date element stopped working
vti
viacheslav.t at gmail.com
Tue Mar 25 11:45:26 GMT 2008
Carl Franks(fireartist at gmail.com)@Tue, Mar 25, 2008 at 09:45:51AM +0000:
> On 24/03/2008, vti <viacheslav.t at gmail.com> wrote:
> > After updating to the current html-formfu Date element stopped working on
> > default_values(), though it works on update().
>
> There's only been 1 minor change to the Date element between v0.02000
> and v0.02004 - and it shouldn't have had any effect.
> However, there has been a lot of changes in svn since v0.02004 - can
> you update to the latest svn version, and let me know if that works.
>
> If it still doesn't work, you'll need to do some more digging.
> All tests pass, so there's unlikely to be a major problem.
>
> Are you using blocks with nested_name() at all?
> default_values() expects you to use the full nested-name for all fields.
Thanks for the reply...
I must admit that `default_natural: 'today'' works and adding to the db through
DBIC model works too, but getting it out and filling the form doesn't.
Everything except Date element works in the both directions. I am using MySQL,
my conf looks like:
---
attributes:
class: formfu
elements:
- type: Text
name: title
label_loc: 'formx_label_title'
constraints:
- type: Required
message_loc: 'formx_constraint_required'
- type: Date
name: endtime
strftime: '%Y-%m-%d'
- type: Submit
name: submit
value_loc: 'formx_value_submit_save'
constraints:
- SingleValue
When I try something like:
$form->get_element('title')->default('foo');
$form->get_element('endtime')->default('2008-05-06');
Title is filled with the `foo' value and date doesn't :-(
--
vti -- Viacheslav Tikhanovskii
More information about the HTML-FormFu
mailing list