[html-formfu] Increment id on block elements

Stephen Shorrock stephen.shorrock at googlemail.com
Mon Dec 7 18:30:03 GMT 2009


> Thanks - I'm glad it's useful!

It certainly is we are using it more and more

> I've added $block->auto_block_id() in svn commit r1633, so you can
> either get it from svn or wait until the next cpan release
> - sometime between now and Christmas (2009) ;)>

I created a new Block element class with the prepare_id method.  I
thought it would be tidier to access my data via a filter rather than
an action but unfortunately I seem unable to access it in either
plugins or filters:

in my plugin/filter

$var = "rt_1";
$self->parent()->form->get_all_element($var)->content('value was: '.$value);

fails with 'Can't call method "content" on an undefined value ' .
Viewing the source the elements exist.  Am I trying to access the
values before prepare_id has been run?  hence is this not possible?


Stephen




> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>



More information about the HTML-FormFu mailing list