array $flexy->
getElements (
)
All Form elements, FORM, INPUT, SELECT and any HTML tag that includes the attribute flexy:dynamic Is converted into HTML_Template_Flexy_Element's and stored serialized in the same folder as the Compiled flexy template.
You can use this array to make changes to these elements or find out what form elements exist on a page.
Note: you should put the modified result as the $elements argument of >outputObject(), you do not however have to fetch the elements to assign them, you can just create blank elements, and merge them.
array
- of Elements contained within the template. (or an empty array if
no form/dynamic elements are used)
This function can not be called statically.
Introspecting a template
<?php
$form = new HTML_Template_Flexy();
$form->compile('some_file_name');
print_r($form->getElements());
?>
template example
<BODY> <FORM name="XXXX"> <INPUT name="yyy"> <SELECT name="zzz"> <OPTION value="aaaa">AAAAA</OPTION> </SELECT> </FORM> </BODY>
template compiled
<BODY> <?php echo $this->elements['XXXX']->toHtmlnoClose();?> <?php echo $this->elements['yyy']->toHtml();?> <?php echo $this->elements['zzz']->toHtml();?> </form> </BODY>
output from the Introspection