<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks again Carl,<div><br></div><div>your guess is correct: I'm using&nbsp;<span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 13px; ">auto_fieldset()</span></div><div><font class="Apple-style-span" face="-webkit-monospace" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="-webkit-monospace" size="3"><span class="Apple-style-span" style="font-size: 13px;">Without it everthing works as I expected.</span></font></div><div><br><div><div>Am 17.09.2008 um 12:24 schrieb Carl Franks:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>2008/9/17 goetz &lt;<a href="mailto:devel@helektra.de">devel@helektra.de</a>>:<br><blockquote type="cite">Hallo,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I trie to use &nbsp;get_element with no success.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The debug output is always undef.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When I use get_field or get_all_element I get the correct<br></blockquote><blockquote type="cite">output.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Any hint?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Her are the details:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">in the config file:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - type: Select<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;name: name<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;label: name<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">in my controler:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">my $test = $form->get_element({ type => 'Select'}); &nbsp;# undef !!!!!!!<br></blockquote><blockquote type="cite">my $test01= $form->get_elements({type => 'Select'});<br></blockquote><blockquote type="cite">my $field = $form->get_field(name => 'name');<br></blockquote><blockquote type="cite">my $select= $form->get_all_element({type => 'Select'});<br></blockquote><br>As that's only a snippet of the form config - I'm going to take a<br>guess that you're either using auto_fieldset() - or the Select menu is<br>nested by some other means, such as an explicit block.<br><br>In which case, this behaviour is correct.<br><br>$form->get_element() only returns direct children of the form object.<br>If the Select element is nested within a fieldset or block, it'll<br>never be returned.<br><br>$form->get_elements() also won't return nested children, but it won't<br>be undef, it'll just return an empty arrayref.<br><br>$form->get_all_elements() does a recursive search, so it'll return the<br>Select element.<br><br>$form->get_field() also does a recursive search, so that'll work.<br><br>If you're after a field, then get_field() / get_fields() are probably best.<br><br>Cheers,<br>Carl<br><br>_______________________________________________<br>HTML-FormFu mailing list<br><a href="mailto:HTML-FormFu@lists.scsys.co.uk">HTML-FormFu@lists.scsys.co.uk</a><br>http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu<br><br></div></blockquote></div><br></div></body></html>