Reply
Member
fishbus
Posts: 3
Registered: ‎06-05-2008
0

eMail Form Problems

Hi

 

I've been having some problems with email forms and wondered if anyone could help me.

 

I moved my site over from another company to BT. I had the form mailer already set up on that site and don't really want to mess about redoing all the HTML code once again.

 

Is there any way that I can migrate my forms over to the BT site simply? How do I create a new cgiemail document that will forward these variables? And where do I post it in my FTP folders?

 

Thanks so much!

 

The code is:

 

<form action="/cgi-bin/cgiemail" method="post" name="">
<!-- HTML Template used for the page after successful submission -->
<input type="hidden" name="cgiemail_html" value="X-Post_success.htm" />
<!-- HTML Template used in case an error occurs -->
<input type="hidden" name="cgiemail_error" value="X-Post_error.htm" />
<!-- Customized Error message for bad Email addresses -->
<input type="hidden" name="cgiemail_invalid" value="You typed an invalid e-mail address. Please try again." />
<!-- Sent this email to webmaster -->
<input type="hidden" name="cgiemail_username" value="comps@directpublications.co.uk" />
<!-- The Subject line in the email -->
<input type="hidden" name="cgiemail_subject" value="Competition entry" />
<!-- The order in which to show the values in the body of the email -->
<input type="hidden" name="cgiemail_order" value="Name:Address:email:Answer:Age" />
<!-- Fields that must be submitted -->
<input type="hidden" name="cgiemail_required" value="Name:You have not included your full name" />
<input type="hidden" name="cgiemail_required" value="email:You have not included your full email address" />
<input type="hidden" name="cgiemail_required" value="Answer:You have not included your answer" />
<input type="hidden" name="cgiemail_required" value="Address:You have not included your full postal address" />
<input type="hidden" name="cgiemail_required" value="Age:You have not confirmed that you are old enough to enter this competition" />

<table width="89%" border="0" align="center">
<tr>
              <td height="363"><div align="center">
                  <table width="88%" border="0">
                    <tr>
                      <td align="right" valign="middle" height="4"><div align="right">
                          <p>Answer:</p>
                        </div></td>
                      <td align="left" valign="middle" height="4"><div align="left">
                          <input name="Answer" size="20" />
                        </div></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td align="left" valign="middle"><p>Your
                          contact details:</p></td>
                    </tr>
                    <tr>
                      <td align="right" valign="middle"><p>Name:</p></td>
                      <td align="left" valign="middle"><input name="Name" size="20" /></td>
                    </tr>
                    <tr>
                      <td align="right" valign="middle"><p>E-mail:</p></td>
                      <td align="left" valign="middle"><input name="email" size="20" />
                      </td>
                    </tr>
                    <tr>
                      <td align="right" valign="bottom" height="2">&nbsp;</td>
                      <td align="left" valign="bottom" height="2">&nbsp;</td>
                    </tr>
                  </table>
                  <p>Please
                    note: you must be 12 or over to enter
                    this competition. Please tick the
                    box to confirm that
                    you are 12 years or older
                    <input type="checkbox" name="Age" value="Yes" />
                  </p>
                  <p>Full
                    postal address: <br />
                    <textarea rows="4" cols="20" name="Address"></textarea>
                    <br />
                    <br />
                    <input type="submit" value="Submit" name="submit" />
                  </p>
                                  </div></td>
            </tr>
          </table>
        </form>

Master User
chris
Posts: 131
Registered: ‎09-10-2007
0

Re: eMail Form Problems

CGI scripting is only available with the Web Hosting and Advanced Web Hosting packages, Lite Web Hosting does not support this.

 

Assuming you have access to CGI scripting I would suggest you use the FormMail script that is available from within the BT Business Website Centre.

 

Goto Site Builders -> Plug-in Scripts -> FormMail.

 

Once you run through the wizard it will give you some code, if you look at this code and adjust your own code accordingly your form should work fine.

 

The reason your own CGI script may not work is that a lot of email scripts are disabled by the server as they could possibly pose a security risk.

 

Chris.

Member
fishbus
Posts: 3
Registered: ‎06-05-2008
0

Re: eMail Form Problems

Thanks Chris

 

I had a look at that before, but it's not very clear - I couldn't find a proper walkthrough to talk me through it.

 

I also couldn't see any option to take you to all of the following (only one of them):

 

A success page (to tell you you've successfully sent your e-mail

An Error page (to tell you you haven't filled in all the segments)

An e-mail error page (to tell you that your e-mail address is not accurate)

 

Thanks

Master User
chris
Posts: 131
Registered: ‎09-10-2007
0

Re: eMail Form Problems

As the FormMail script is based on Matt Wright FormMail script then the following page will advise on the different Form Fields and their purpose.

 

http://www.scriptarchive.com/readme/formmail.html#form_config

 

Note: it is possible that not all of these will work with the BT Business hosting but the majority of them will.

 

 

A success page (to tell you you've successfully sent your e-mail
<input type=hidden name="redirect" value="http://your.host.com/to/file.html">


An Error page (to tell you you haven't filled in all the segments)
<input type=hidden name="missing_fields_redirect" value="http://your.host.com/error.html">


An e-mail error page (to tell you that your e-mail address is not accurate)
I can not see any specific support for this outcome so I guess the default error page would be called, but you will have to test this.

 

 

Chris

Member
fishbus
Posts: 3
Registered: ‎06-05-2008
0

Re: eMail Form Problems

Thanks Chris - much appreciated.

 

I've looked at that but it looks about as clear as mud :smileyhappy:

 

I feel a heavy weekend coming on

 

Thanks again