2009/3/26 Ascii King <t...@swattermatter.com>: > 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|
I should have realised from the name 'repeat_chunk' that you were searching for a Block, not a field. Yes, you need: get_all_element() I suspect what's happening here is that the rep blocks aren't getting the 'name' copied over. If you use Data::Dumper, you should be able to confirm that. If that's the case, could you commit a fix? Cheers, Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu