I have managed to add several extra fields to 'Contact Us'
It seems to be working ok with one exception, If one of the mandatory fields is left blank, It re-writes the page and reports the empty field/s (as it should).
However, It empties all the other fields, making the user having to start over.
The original fields, (yet to be removed from the form) redisplay the value of the entered fields.
I have experimented with variations of the following segmant from MailForm.pl but I am not able to get the 'Telephone' field to display the value if the user entered it in the first place.
Once I get the Telephone field working correctly, I can set up the rest...
As you can guess, Perl is not my native language. Any advice on this will be much appreciated
Thanks
It seems to be working ok with one exception, If one of the mandatory fields is left blank, It re-writes the page and reports the empty field/s (as it should).
However, It empties all the other fields, making the user having to start over.
The original fields, (yet to be removed from the form) redisplay the value of the entered fields.
I have experimented with variations of the following segmant from MailForm.pl but I am not able to get the 'Telephone' field to display the value if the user entered it in the first place.
sub DisplayMailPage
{
my ($sName, $sSubject, $sEmail, $sText, $sTelephone) = @_; #### Line modified 3 Mar 2007
#
# Display the mail page
#
my %VarTable;
$VarTable{'NETQUOTEVAR:NAMEVALUE'} = $sName;
$VarTable{'NETQUOTEVAR:EMAILVALUE'} = $sEmail;
$VarTable{'NETQUOTEVAR:SUBJECTVALUE'} = $sSubject;
$VarTable{'NETQUOTEVAR:MESSAGEVALUE'} = $sText;
$VarTable{'$sTelephone'} = $sTelephone; # new line 3 Mar 2007
my @Response = ACTINIC::TemplateFile(ACTINIC::GetPath() . "mail_form.html", \%VarTable); # make the substitutions
if ($Response[0] != $::SUCCESS)
{
my ($sName, $sSubject, $sEmail, $sText, $sTelephone) = @_; #### Line modified 3 Mar 2007
#
# Display the mail page
#
my %VarTable;
$VarTable{'NETQUOTEVAR:NAMEVALUE'} = $sName;
$VarTable{'NETQUOTEVAR:EMAILVALUE'} = $sEmail;
$VarTable{'NETQUOTEVAR:SUBJECTVALUE'} = $sSubject;
$VarTable{'NETQUOTEVAR:MESSAGEVALUE'} = $sText;
$VarTable{'$sTelephone'} = $sTelephone; # new line 3 Mar 2007
my @Response = ACTINIC::TemplateFile(ACTINIC::GetPath() . "mail_form.html", \%VarTable); # make the substitutions
if ($Response[0] != $::SUCCESS)
As you can guess, Perl is not my native language. Any advice on this will be much appreciated
Thanks
Comment