Skip Menu |

This queue is for tickets about the Catalyst-Controller-HTML-FormFu CPAN distribution.

Report information
The Basics
Id: 38850
Status: rejected
Priority: 0/
Queue: Catalyst-Controller-HTML-FormFu

People
Owner: Nobody in particular
Requestors: rod.taylor [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.03000
Fixed in: (no value)



I've found that without $c->request as a parameter to process(), the form parameters are never found. Docs don't mention that. Attached is a partial correction. Note, I'm doing this: sub transaction : Chained('lead') PathPart Args(1) { my ($self, $c, $foo) = @_; my $transactionType = $c->model('...')->getTransactionType($foo); my $form = $self->transactionLoadForm( $c, $transactionType ); } sub transactionLoadForm : Private { my ( $self, $c, $transactionType ) = @_; my $formFile = $c->path_to(qw{root forms }, $transactionType); my $form = $self->form; $form->load_config_file($formFile); $form->process($c->request); ### $c->request is required $c->stash->{'form'} = $form; return $form; }
Subject: processdocs.patch
*** FormFu.pm.orig Thu Jun 19 07:07:12 2008 --- FormFu.pm Fri Aug 29 15:02:09 2008 *************** *** 241,247 **** # # my $form = $self->form; # ! # $form->process; # # $c->stash->{form} = $form; } --- 241,247 ---- # # my $form = $self->form; # ! # $form->process($c->request); # # $c->stash->{form} = $form; } *************** *** 255,261 **** # # $form->load_config_file('root/forms/my/controller/bar.yml'); # ! # $form->process; # # $c->stash->{form} = $form; # --- 255,261 ---- # # $form->load_config_file('root/forms/my/controller/bar.yml'); # ! # $form->process($c->request); # # $c->stash->{form} = $form; # *************** *** 277,283 **** # # $form->load_config_file('root/forms/my_config.yml'); # ! # $form->process; # # $c->stash->{form} = $form; # --- 277,283 ---- # # $form->load_config_file('root/forms/my_config.yml'); # ! # $form->process($c->request); # # $c->stash->{form} = $form; # *************** *** 299,305 **** # # $form->populate( $c->load_form ); # ! # $form->process; # # $c->stash->{form} = $form; # --- 299,305 ---- # # $form->populate( $c->load_form ); # ! # $form->process($c->request); # # $c->stash->{form} = $form; #
On Fri Aug 29 15:22:02 2008, rtaylor wrote: Show quoted text
> I've found that without $c->request as a parameter to process(), the > form parameters are never found. Docs don't mention that. > > Attached is a partial correction.
This wasn't intentional, so I've changed the code so that $form->query( $request) is set before the form is returned. So now you can just call process() without any arguments. Cheers, Carl