[html-formfu] position element not found
Gabor HALASZ
halasz.g at freemail.hu
Mon Jan 9 18:18:53 GMT 2012
Hi!
I tried to add elements to my form (new elements into a fieldset
element), but I got exception with $subject. My code is:
my $position = $c->stash->{form}->get_all_element({ type => 'File', });
# my $position = $c->stash->{form}->get_all_element;
use Data::Dumper;
$c->log->debug( 'HIER: ' . $position );
$c->stash->{form}->insert_after( $c->stash->{form}->element( {
The debug log:
[debug] Restored session "ad2db20e3852c4d33f421258241d2aecb1a18cc4"
[debug] HIER: <div class="file label">
<label>Photo</label>
<input name="image" type="file" title="form.element.title.picture" />
</div>
[debug] Rendering template "form.tt"
[error] Caught exception in PAGL::Controller::Picture->manage "position
element not found at
/usr/home/HalaszGabor/Pagl/script/../lib/PAGL/Controller/Picture.pm line 53"
If I tried get_all_elements without %options, and the insert_after
works, adds the new element after the first element of form. What's wrong?
--
Gabor HALASZ <halasz.g at freemail.hu>
More information about the HTML-FormFu
mailing list