Hello!

I have a fillout-form with 2 buttons in which users have to review their given information from a further form.
If the one button (named 'back') gets clicked, the user want's to change his given information.
Else, he would submit his data.
Now, I thougt i can check for the runmode ('save') given in the review-form by a hidden-field and set the correct runmode.


workflow:
fillout-form  <-----+
        |                 |
        V                 |
    review -->--->---+
        |                 |
        V                 |
submit the data or -+

Now my code:

sub cgiapp_prerun {
     my $self = shift;
     if( $self->get_current_runmode() eq 'save' ){
         my $q = $self->query();
         if( defined($q->param('back')) ){
             $self->prerun_mode('showForm');
#print STDERR $self->get_current_runmode();
             $q->param(-name=>'error', -value=>1);
         }
     }
} # /cgiapp_prerun

This doesn't work.
Anytime the button 'back' gets clicked, I saw the fillout-form AND the review-form.
The output to STDERR returns 'save', although I set it to 'showForm'...
mfg pktm


PS: sry for the typos, I'm a german programmer

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to