2009/3/26 Ascii King <t...@swattermatter.com>: > Thanks for your help so far. I have the first-child working but it isn't > exactly what I need. I have some javascript code that allows me to > dynamically add rows to repeatable elements. However, it refers to the rows > by classname and id. I need to be able to make the first or last row in the > repeatable a different class. > > Is it possible to assign a class to a div tag through code? I can't get hold > of the tag because it is a field, I think. And get_element is not for common > use? (plus it doesn't work) > > $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 _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu