2008/12/18 Johannes <list...@hoerburger.org>: > Hi guys, > trying to create form elements that are not in the formconfig.yml I > succeeded creating and rendering them to the page, but they don't arrive on > submit. Any idea if something like that may be possible?
Hi Johannes, After submission, you need to make sure you're adding all the dynamic fields again, before calling process(), as FormFu will only allow values that correspond to known fields. I would normally handle this by writing a Plugin subclass that has a process() method which adds the dynamic fields. This'll mean the fields are present when FormConfig() calls $form->process(). Otherwise, you'll have to do something like this: sub edit : Chained('foo') : PathPart : Args(0) : FormConfig { my ( $self, $c ) = @_; my $form = $c->stash->{form}; $self->_add_dynamic_fields( $form ); $form->process(); if ( $form->submitted_and_valid ) { # ... } return; } _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu