Hi folks, I've got a strange problem where I'm getting the value "3333" on a form element and when I view the source on the page it contains values whic I have set in the module, at the moment they are undefined/empty string (browsing with firefox).

On IE and Netscape for some reason the password elements are remembered I don't understand why because I have set them to be empty/undefined in the module.

The reason I'm trying to do this is because I don't want to keep the password values on the form if an incomplete form is submitted.

Any ideas ?   Thanks in advance for any light anyone can shed on this.


Here's where my script is:

http://captainchainsaw.homelinux.com/cgi-bin/main.pl


##########################cgi script ##########################

my ($first_name_value, $last_name_value, $email_value, $password_value, $confirm_password_value, $submit)= $register->get_form_values($q, $first_name, $last_name, $email);

my $template = HTML::Template->new(filename => $conf->get_key('registration_form'));
$template->param(
START_FORM => $q->start_form,
FIRST_NAME => $first_name_value,
LAST_NAME => $last_name_value,
EMAIL => $email_value,
PASSWORD => $password_value,
CONFIRM_PASSWORD => $confirm_password_value,
SUBMIT => $submit,
END_FORM => $q->endform
);


           print $template->output;
       }
#############################################################




##################### registration.pm module ######################### sub get_form_values{ my $self=shift; my $q = shift; my $first_name=shift; my $last_name=shift; my $email=shift;



$first_name = $q->textfield(-name=>'first_name',
                              -value=>"$first_name",
                              -size=>30,
                              -maxlength=>40);

$last_name  = $q->textfield(-name=>'last_name',
                              -value=>"$last_name",
                              -size=>30,
                              -maxlength=>40);

$email      = $q->textfield(-name=>'email',
                              -value=>"$email",
                              -size=>30,
                              -maxlength=>75);


my $password = $q->textfield(-name=>'password', -value=>"", -size=>30, -maxlength=>50);

my $confirm_password = $q->password_field(-name=>'confirm_password',
                                    -value=>"",
                                    -size=>30,
                                    -maxlength=>50);

my $submit = $q->submit(-name=>'button_name',
                       -value=>'Submit');



return ($first_name, $last_name, $email, $password, $confirm_password, $submit);
}
#############################################################




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to