[html-formfu] get_all_element - what's an element?
Carl Franks
fireartist at gmail.com
Wed Apr 1 15:02:13 BST 2009
2009/4/1 Ascii King <tech at swattermatter.com>:
> Are the elements referred to in get_all_element only form fields and block
> tags? Can a link be an element?
Anything that can be added with $form->element()
is returned by $form->get_elements()
If you add it with, for example:
$form->element({ type => 'Block' });
then you retrieve it with:
$form->get_element({ type => 'Block' });
> Is it possible to grab this:
>
> <a name="expenditure_count" href="#">Add Another Expenditure</a>
>
> How do I do it? The following examples fail.
>
> $Repeat_field = $form->get_all_element({
> name => 'expenditure_count',
> });
Can you write a test for that? It should work.
> $Repeat_field = $form->get_all_element({
> type => 'a',
> });
There is no 'a' element.
How is that HTML being generated?
Cheers,
Carl
More information about the HTML-FormFu
mailing list