[html-formfu] Different attributes for the first record in a repeatable block

Carl Franks fireartist at gmail.com
Thu Mar 26 14:05:21 GMT 2009


2009/3/26 Ascii King <tech at swattermatter.com>:
> I apologize for asking this twice, but I have not yet solved it.
> Is it possible to specify a different characteristic for the first record in
> a repeatable? I would like the class in the first repeatable block to be
> different from the rest of the class tags. Something like a
> first_record_attributes option or the header in a table.

There's nothing that would currently achieve this.

Can you use the "first-child" CSS pseudo-selector?
It's supported in IE7+ and every other browser.

Currently, the output of a Repeatable isn't wrapped in a containing
div, but I don't think it would break anything to change that.
Then you could do:

    .repeatable div:first-child { }

Any help?

I'd be a little worried that if a first_rep_attributes() were added,
there'd soon be calls for:
    last_rep_attributes(),
    odd_rep_attributes(),
    even_rep_attributes()...
And where would it stop? ;)

Carl



More information about the HTML-FormFu mailing list