[html-formfu] Different attributes for the first record in a
repeatable block
Ascii King
tech at swattermatter.com
Thu Mar 26 19:39:19 GMT 2009
I read the documentation. I swear! :)
Will the get_field function grab a div tag? I can't get it to, even if
the tag is not in a repeatable element. The div tag I want is buried in
some fieldsets, so do I need to use 'get_all_element'?
Truthfully I've tried every combination and I can only get it to work
for fields, not for div tags.
$Repeat_field = $form->get_field( 'repeat_chunk' );
$Repeat_field->attributes('class' => 'foo');
Works for a text box, but not a div tag. The error I get from a div tag attempt is:
|"Can't call method "attributes" on an undefined value|
>
> $Repeat_field = $form->get_element({ name => 'repeat_chunk' });
> $Repeat_field->attributes('class' => 'foo');
>
>Ok, I need to change the docs, so get_field() is above get_element() -
>as no-one seems to read the description of what the methods do! :)
>
> $form->get_field( 'repeat_chunk' );
>
>Carl
More information about the HTML-FormFu
mailing list