# Solved: Has anyone used Tectite's formail



## aconite (Feb 1, 2006)

hi,

I am using Tectite's formail to process my forms and am having problems, when I first tested out the form, I kept on getting error messages even though I filled in the required fields, so I decided to use a plain text template so I the fields I wanted filled in would be filled in, I tested it, there was no error message but my good_url (http://www.drewsviews.com/contact/thankyou.html) didn't even show up, have no idea why

FORM STRUCTURE

FIELDS MARKED WITH AN * MUST BE ENTERED

First Name:* 

Last Name:* 

Address: 

Suburb: 

Postcode: 

State: 
ACT
VIC
QLD
SA
NSW
WA
NT
TAS

Mobile:* 

Home:* 

Work: 

Email:* 



Please check which service you may require

Consultation

Design

Landscape Design

Other 



Would you like to receive our newsletter

Yes

No

Any help appreciated


----------



## brez (Aug 19, 2007)

You need to config the "submit" link

When submit is clicked, it redirects to "http://www.drewsviews.com/fm.php" instead of to your inbox!


----------



## aconite (Feb 1, 2006)

Not really sure how to config the "submit" link but will this show the thank you page


----------



## brez (Aug 19, 2007)

Yes, once the email has been despatched, 

in your "Submit.php" file you set your own inbox address to receive the completed form.


----------



## tomdkat (May 6, 2006)

I'm using Tectite's FormMail and I noticed your form is missing some hidden fields,
namely:

recipients
required
subject

What kind of error messages were you getting previously? I just tested out your form and it not displaying the "good_url" page means the form script encountered a problem and prematurely terminated. I ran into this problem when I was getting my form up and running but I ended up debugging it manually since I was making considerable modifications to the script.

I'll play around with your form when I get some spare cycles.

Peace...


----------



## aconite (Feb 1, 2006)

I have added the hidden field: receipents, so it is as follows:

I used the plain text template for the required fields, when I filled in the phone number for work and mobile, I would get an error message to say that it hasn't been filled in, even though I did fill the fields in. I don't really need the subject field.
Your help greatly appreciated

thanks


----------



## tomdkat (May 6, 2006)

Ok, the message you're getting about fields not being filled in is due, I think, to missing "name" attributes on your form fields.

Here is a sample definition of the "name" field on my form:


```
<td>     
        <p class="pagetext"><font color="red">*</font>Name:</p>
</td>
<td>
       <input name="realname" size="50" type="text"> <br>
</td>
```
Note the 'name="realname"' attribute on the "input" tag. Here is your "first name" definition:

```
<p>First Name:<span class="style">*</span>&nbsp;<input type="text" size="35" /></p>
```
Since NONE of your "input" tags have "name" attributes, the FormMail script won't know which field is which and will get confused. So, I suggest doing something like this:

```
<p>First Name:<span class="style">*</span>&nbsp;<input type="text" size="35" name="fname" /></p>

<p>Last Name:<span class="style">*</span>&nbsp;<input type="text" size="35" name="lname"/></p>

<p>Address: &nbsp; &nbsp; &nbsp; &nbsp;<input type="text" size="35" name="addy"/></p>

<p>Suburb:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type="text" size="35" name="burb"/></p>

<p>Postcode:&nbsp; &nbsp; &nbsp;<input type="text" size="10" name="postcode"/></p>

<p>State:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <select name="state">
<option>ACT</option>
<option>VIC</option>
<option>QLD</option>
<option>SA</option>
<option>NSW</option>
<option>WA</option>
<option>NT</option>
<option>TAS</option>
</select></p>

<p>Mobile:<span class="style">*</span>&nbsp; &nbsp; &nbsp; &nbsp;<input type="text" size="35" name="mobileno"/></p>

<p>Home:<span class="style">*</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type="text" size="35" name="homeno"/></p>

<p>Work: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type="text" size="35" name="workno"/></p>
<p>Email:<span class="style">*</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" size="35" name="email"/></p>
```
 Do that kind of thing for all the form fields and add this to your form to enforce the required fields:

```
<input name="required" value="email:Your email address,
    fname:Your first name,
    lname:Your last name,
    mobileno:A current mobile contact phone number,
    homeno:A current home contact phone number
    type="hidden">
```
 See how that goes. 

Peace..


----------



## aconite (Feb 1, 2006)

I did put the "name" value but I still don't get the thankyou page, why?


----------



## tomdkat (May 6, 2006)

Ok, that looks better. You should also assign a name to the checkbox items (they should have the same name) so those values can be processed as well.

Are you getting ANY e-mail notifications with errors at the e-mail account specified in fm.php?

The blank page that appears means there is still something wrong that is causing the script to prematurely terminate. I'll take a peek at this, this weekend.

Peace...


----------



## tomdkat (May 6, 2006)

aconite and I took a look at his script more closely offline. He had a syntax error in it that was causing his problem, I believe.

Peace...


----------



## aconite (Feb 1, 2006)

tomdkat,
thank you very much, fixed the syntax error and my thankyou page appeared


----------



## tomdkat (May 6, 2006)

Great! 

Peace...


----------

