[html-formfu] Date field - changing the order of the sub fields

Carl Franks fireartist at gmail.com
Fri Oct 3 15:11:00 BST 2008


2008/10/3 Daniel Nicoletti <dantti85-perl at yahoo.com.br>:

> elements:
>       - type: Date
>         name: birthdate
>         label: 'Birthdate:'
>         field: year
>           prefix: "- Year -"
>           plus: 20
>         field: month
>           prefix: "- Month -"
>         auto_inflate: 1
>
> i'm not sure this yml is right, but
> this could give a hint about
> what fields to show and also use it's
> order as the yr come before the month.

'fraid that wouldn't work - it's a hash definition, so you can't have
multiple occurrences of the 'field' key.
hash keys are also unordered.

I don't think it would be worth breaking the way Date elements are
already specified, just for this.
In fact, it looks like Ronald's patch would deal with what you're asking for.

Carl



More information about the HTML-FormFu mailing list