[html-formfu] Populate form using a complex hashref?
Moritz Onken
onken at houseofdesign.de
Sun Mar 8 15:54:53 GMT 2009
Am 03.03.2009 um 17:04 schrieb Moritz Onken:
>
> Am 03.03.2009 um 12:48 schrieb Carl Franks:
>
>> 2009/3/3 Moritz Onken <onken at houseofdesign.de>:
>>> I think this can be part of FormFu itself and should not be an
>>> extra module
>>> on CPAN.
>>> There is one additional requirement: Hash::Flatten. But from what
>>> I can tell
>>> this seems to be a rock solid module, written by BBC.
>>>
>>> Have fun and tell me what you think!
>>>
>>> The test explains most its functionality
>>
>> I'm ok with it being in the core HTML-FormFu module,
>> though I'd rather it stuck with formfu's conventions for building
>> accessors and overriding methods.
>> Eventually, formfu might use Moose, but until then, I'd rather keep
>> the codebase consistent.
>>
>> Could you also split the tests out into multiple files, each named to
>> describe what it's testing?
>>
>> If you could address both those points, I'll be more than happy to
>> commit it.
>>
For HashRef to work properly I need a method to unset the values of
each field.
I tried that with:
map { eval { $_->default(undef) } } (grep { $_->is_field } @{$form-
>get_all_elements});
which works fine, but fails on a Date element with:
Invalid date format: at lib/HTML/FormFu/Element/Date.pm line 150
Is this a Date (DateTime) bug because you cannot set it to undef or
should I try another
way to set these fields to undef.
moritz
More information about the HTML-FormFu
mailing list