[html-formfu] accessing and changing the attrib "content_xml" of an element, type Block (div) with given id doesn't work

Carl Franks fireartist at gmail.com
Fri Nov 28 10:19:02 GMT 2008


2008/11/28 Christoph Metz <mail-lao at web.de>:
> hey guys :)
>
> i am using FormFu within the Catalyst MVC Framework. at this point i got a
> FormFu conf in apache-style with this part:
>
> ...
> <elements>
>       type Block
>       id rahmen
>       <element>
>           type Block
>           id summe_caption
>           tag div
>           content_xml <a>Auftragssumme:</a>
>       </element>         <elements>
>           id summe
>           type Text
>           size 40
>           name summe
>           <attributes>
>               autocomplete off
>           </attributes>
>           constraint SingleValue
>       </elements>
>   </elements>
> ...
>
> so far so good, all elements are displayed and so on... but what if i want
> to change the "content_xml" of the Block (div) with the id "summe_caption"?
> get_field() only returns form-elements, get_element() returns nothing with
> the given id.

The Block is nested within another, so you need
$form->get_all_element() which does a recursive search

Carl



More information about the HTML-FormFu mailing list