I've been having problems making changes to the 'Contact us' form; I wanted to expand the functionality of the form, to allow people to send an account request, and other items.
After much trial an error I managed to change the 'Subject' field on the traditional form to a radio-button format with preset subject headers, with the addition of an <id> tag within the <input> tag, like so:
This worked fine and was the first step on a path to changing the whole form.
The next step was to add some extra fields; the instructions for which I took out of the version 7 Advanced Users Guide.
I added two fields, listed below.
The first of these fields was just to try adding a new field. This was specified as a postcode, as I ultimately want separate address, city, county etc. fields in the finished version; but I wanted it left as a 'not required' field.
The second field was the same as the first, but I wanted to try and make it a 'required' field.
The html for this displays correctly when I view just the Act_ContactUs.html page in Firefox.
Then I turned my attention to the mailform.pl file - taking all the code amendments from the AUG. I'm pretty sure that I made the changes correctly, but I must be doing something wrong, as when I upload and click the 'Contact Us' link, I get the following error message from the server:
I'll be the first to admit that I haven't got a clue when it comes to changing Perl scripts. I've got safe backups of the original script if I need to replace it, but I would like to get the whole thing working. When it comes to html, I have an idea of tags and the principles behind it, but only at a basic level - mostly I look up the stuff I need on w3schools.com; but after playing around I can normally get things to work after a while.
But the CGI errors have completely defeated me. I can't even begin to guess how to fix it, because I don't understand the error!
Incidentally, the reason for the <id> tag in the 'Postcode' html is because it didn't work without them, and I had to add this to the 'subject' field to make it work with radio buttons.
You can look at the site here.
Can someone please help me fix this unknown problem?
Thanks in advance
Mark
EDIT: I've added a zipped folder with the changed MailForm.pl file in it to help get to the bottom of the error.
After much trial an error I managed to change the 'Subject' field on the traditional form to a radio-button format with preset subject headers, with the addition of an <id> tag within the <input> tag, like so:
Code:
<tr> <td valign="top">NETQUOTEVAR:SUBJECT</td> <td><input type="RADIO" name="Subject" id="NETQUOTEVAR:SUBJECTVALUE" value="Open account"> Please open an account for me<br> <input type="RADIO" name="Subject" id="NETQUOTEVAR:SUBJECTVALUE" value="Order problem"> I have a problem with an order I have placed<br> <input type="RADIO" name="Subject" id="NETQUOTEVAR:SUBJECTVALUE" value="Site problem"> I am having problems using your site<br> <input type="RADIO" name="Subject" id="NETQUOTEVAR:SUBJECTVALUE" value="Other"> Other<br> </td> </tr>
The next step was to add some extra fields; the instructions for which I took out of the version 7 Advanced Users Guide.
I added two fields, listed below.
Code:
<tr> <td>Postcode</td> <td> <input type="TEXT" name="Postcode" id="Postcode" size="10" maxsize="20" value=""> </td> </tr> <tr> <td><span class="actrequiredcolor">PostcodeReq:</span>*</td> <td> <input type="TEXT" name="PostcodeReq" id="PostcodeReq" size="10" maxsize="20" value=""> </td> </tr>
The second field was the same as the first, but I wanted to try and make it a 'required' field.
The html for this displays correctly when I view just the Act_ContactUs.html page in Firefox.
Then I turned my attention to the mailform.pl file - taking all the code amendments from the AUG. I'm pretty sure that I made the changes correctly, but I must be doing something wrong, as when I upload and click the 'Contact Us' link, I get the following error message from the server:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Global symbol "$sPostcode" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 53.
Global symbol "$sPostcodeReq" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 54.
Global symbol "$sPostcodeReq" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 70.
Global symbol "$sPostcode" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 86.
Global symbol "$sPostcodeReq" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 86.
Global symbol "$sPostcode" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf0000
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Global symbol "$sPostcode" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 53.
Global symbol "$sPostcodeReq" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 54.
Global symbol "$sPostcodeReq" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 70.
Global symbol "$sPostcode" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 86.
Global symbol "$sPostcodeReq" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf000001.pl line 86.
Global symbol "$sPostcode" requires explicit package name at D:\Inetpub\wwwroot\thechristadelphian.com\www\cgi-bin\mf0000
But the CGI errors have completely defeated me. I can't even begin to guess how to fix it, because I don't understand the error!
Incidentally, the reason for the <id> tag in the 'Postcode' html is because it didn't work without them, and I had to add this to the 'subject' field to make it work with radio buttons.
You can look at the site here.
Can someone please help me fix this unknown problem?
Thanks in advance
Mark
EDIT: I've added a zipped folder with the changed MailForm.pl file in it to help get to the bottom of the error.
Comment