[html-formfu] Attributes in Date/DateTime Elements

Carl Franks fireartist at gmail.com
Wed Dec 8 22:49:44 GMT 2010


On 8 December 2010 22:37, Rasmus Skaarup <mlist at gal.dk> wrote:
>
> How do I add attributes (like onchange and so on) to Date/DateTime Elements?
>
> Using "attributes" seems to add the attributes to the span tag and not individual selects.

Unfortunately, there isn't currently any way to do this.

A patch providing a generic way to set any method/value on the
individual select elements (using populate) would be welcome.

Something like:

  - type: Date
    name: foo
    day:
      passthrough:
        attrs:
          onchange: 'foo()'

Which would simply do something like:
    $sub_element->populate( $config->{passthrough} )

HTML-FormFu's now hosted at https://github.com/fireartist/HTML-FormFu
if you feel like taking it up.

cheers,
Carl



More information about the HTML-FormFu mailing list