[html-formfu] MultiForm and fill_formfu_values

Carl Franks fireartist at gmail.com
Thu Apr 9 08:46:58 GMT 2009


Hi,

One potential problem I've just noticed is - are there any common
fields names between the 2 forms that would cause the 2nd form to
think it's already been submitted?
A hint - set 'indicator' on both forms - but don't set it to 'submit'
if both forms have a button named 'submit'.

If this is the problem, then in this line:
    $row->fill_formfu_values( $c->stash->{multiform}->current_form );
current_form() will be returning undef.

I think you could test this, by adding a
    die 'complete' if $c->stash->{multiform}->complete;
after that line.

I this isn't the problem - then could you send your code for
fill_formfu_values() ?

Carl


2009/4/8 Josef Chladek <josef.chladek at gmail.com>:
> hello,
>
> I've a problem with MultiForms, the "first" form shows the data from db, the
> "second" form won't - am I doing something wrong?
>
> the controller code:
>
> sub show : Local : MultiFormConfig('auth/show.yml') {
>    my ( $self, $c ) = @_;
>
>        $c->detach('login') if (!$c->user_exists);
>        if ( $c->stash->{multiform}->complete ) {
>        ...
>        }
>
>        my $row = $c->model('Frontwave::UserDepot')->find($c->user->obj->id);
>        $row->fill_formfu_values( $c->stash->{multiform}->current_form );
> }
>
> form config is trivial, does not depend on any fields, if I replace fields
> shown in "1" and place them in "2" no values are shown...
>
> any hints?
>
> regards
> josef
>
> ps: btw, carl, thanks for the last answer regarding "multiple model_stash?",
> putting resultset and model in model_config did the trick!
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>



More information about the HTML-FormFu mailing list