On Oct 5, 2008, at 6:01 PM, Octavian Rasnita wrote:
Hi,
I am working on a Catalyst app, and I need to display a login form
in every
page, (which could be shown or it could be replaced with a
"logout" button
or link).
In some pages I also need to display a second form and if I use the
parameter FormConfig for loading it, the content of this form is
shown in 2
places.
What's the suggested way of handling this problem?
Should I create the login form manually in every page using $c-
>form?
Thank you for any hints.
Some suiteable place:
package MyApp::Controller::Root;
use parent 'Catalyst::Controller::HTML::FormFu';
sub auto : Private {
my ($self, $c) = @_;
my $login_form = $self->form;
$login_form->load_config('forms/login.yml');
$c->stash->{login_form} = $login_form;
}
Then you wont stomp on your own form all the time.
- andreas
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu