in reply to Re^2: Checkbox parameter not being stored in CGI::Session
in thread Checkbox parameter not being stored in CGI::Session
err. newbie code. ok thank you for pointing these out. will go a long way in my development as a perl developer.
We've all been there :)
sub collect_data { my $self = shift; my( $page_data, $errors ) = valiDaaTTTee( $self->query, $validatio +nProfile ) if( $errors ){ return $self->tt_process('collect_data.tt', $errors ); } else { $self->validated_session( $page_data ); return $self->redirect( $self->url_for('display) ); } }
on success you do a redirect get with a url_for('display') not 'mode2' ... matching names makes make things easier ...
valiDaaTTTee can be some something you write using Data::FormValidator kinda like CGI::Application::Plugin::ValidateRM
Want to inspect sessions? If viewing your temp or session directory isn't enough, you can always write a session viewer in your admin.cgi :)
Now to add sub validated_session { } and sub url_for { } and sub valiDaaTTTee { } ... redirect comes from plugin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Checkbox parameter not being stored in CGI::Session
by perlron (Pilgrim) on Oct 13, 2014 at 09:51 UTC | |
by Anonymous Monk on Oct 13, 2014 at 10:44 UTC | |
by perlron (Pilgrim) on Oct 22, 2014 at 21:01 UTC |