[html-formfu] Date field_order, new patch

Carl Franks fireartist at gmail.com
Sat Nov 15 22:28:39 GMT 2008


2008/11/3 Ronald J Kimball <rkimball+formfu at pangeamedia.com>:
> Attached is a revised patch for my proposed change to allow reordering the
> sub fields in a Date element.  This is accomplished using field_order, based
> on Deflator::CompoundDateTime, as Carl originally suggested.
>
> The field_order must include each sub field (year, month, day) exactly once.
>  Although it could be useful to show only some of the sub fields (e.g. year,
> month for credit card expiration), doing so results in errors from the
> various DateTime inflators because of the missing values.
>
> The patch includes tests for various field_order values, both valid and
> invalid.

Thanks - I've applied this with some minor changes.
Now, not all 3 fields are required - and I've added tests for just a
month/year variant - including inflation.

Cheers,
Carl



More information about the HTML-FormFu mailing list