/    Sign up×
Community /Pin to ProfileBookmark

HELP – formmail code not working

Not sure what I did wrong but, hope someone can fix this for me.

When I fill out the form and click submit for the form to come to me using my email nothing from the form that was filled out was submitted. I hope I didn’t confuse anyone with that anyway, my HTML form code is listed below…

<html>
<head>
<title> Service Request Form</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>

<body bgcolor=”#FFFFFF” text=”#000000″>

<p align=”center”><font face=”Arial, Helvetica, sans-serif” size=”+3″>Service
Request Form</font></p>
<p align=”left”><font face=”Arial, Helvetica, sans-serif”>Please answer the question
below to the best of your knowledge. It’s import to have as much information
as possible to serve you better.</font></p>
<p align=”center”><font face=”Arial, Helvetica, sans-serif”>This form is for Residental
customers only!</font></p>

<hr noshade align=”center”>
<form name=”form1″ method=”post” action=””>
Today’s Date:
<input type=”text” name=”textfield17″>
First Name:
<input type=”text” name=”textfield”>
Last Name:
<input type=”text” name=”textfield2″>
</form>
<hr noshade align=”center”>
<form name=”form2″ method=”post” action=””>
Address:
<input type=”text” name=”textfield3″ size=”20″>
City:
<input type=”text” name=”textfield4″>
State:
<input type=”text” name=”textfield5″ size=”10″>
Zip:
<input type=”text” name=”textfield6″ size=”10″>
Phone#:
<input type=”text” name=”textfield14″ size=”15″>
</form>
<hr noshade align=”center”>
<form name=”form3″ method=”post” action=””>
Service address if different:
<input type=”text” name=”textfield7″ size=”20″>
City:
<input type=”text” name=”textfield8″>
State:
<input type=”text” name=”textfield9″ size=”10″>
Zip:
<input type=”text” name=”textfield10″ size=”10″>
</form>
<hr noshade align=”center”>
<form name=”form4″ method=”post” action=””>
<p>Please choose one of the following Brands of furnace or A/C that you have
in your home that needs service. Also include Model, Serial and filter size
if you know it.</p>
<p>Brand
<select name=”select” size=”1″>
<option>Choose One</option>
<option>Trane</option>
<option>Lennox</option>
<option>Bryant</option>
<option>Comfortmaker</option>
<option>Coleman</option>
<option>York</option>
<option>Boiler/hot water heat</option>
<option>Amana</option>
<option>Other</option>
</select>
Model#
<input type=”text” name=”textfield11″ size=”20″>
Serial#
<input type=”text” name=”textfield12″ size=”20″>
Filter Size:
<input type=”text” name=”textfield13″ size=”15″>
</p>
</form>
<hr noshade align=”center”>
<form name=”form5″ method=”post” action=”” enctype=”multipart/form-data”>
<p>Please list the nature of your problem below:</p>
<p>
<textarea name=”textfield15″ cols=”75″></textarea>
</p>
</form>
<hr noshade align=”center”>
<form name=”form6″ method=”post” action=””>
How will the service tech get into home?
<input type=”text” name=”textfield16″ size=”75″>
</form>
<hr noshade align=”center”>
<p align=”left”>If have finished the form and ready to send please click Submit
Service Request button or to reset the form and start over please click the
Clear Form button.</p>
<p align=”left”>Thank you!</p>
<p>BTU Management</p>
<hr noshade align=”center”>
<form METHOD=”GET” ACTION=”/cgi/formmail”>
<input TYPE=”SUBMIT” VALUE=”Submit Request Form”> <input TYPE=”RESET” VALUE=”Reset Form”> <input type=”hidden” name=”recipient” value=”[email protected]“>
</form>
<hr noshade align=”center”>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
if (window.print) {
document.write(‘<form>Do not forget to ‘
+ ‘<input type=button name=print value=”Print” ‘
+ ‘onClick=”javascript:window.print()”> this page for your records!</form>’);
}
// End –>
</script>
<hr noshade align=”center”>
<div align=”center”>|&nbsp; <a href=”index.htm”>Home </a>&nbsp; |&nbsp; <a href=”contact1.htm”>Contact
Us</a>&nbsp; |&nbsp; <a href=”estimate.htm”>Free Estimate Form</a>&nbsp; |&nbsp;
<a href=”testimonials.htm”>Testimonials</a> &nbsp;|&nbsp; <a href=”prices.htm”>Prices</a>&nbsp;
|&nbsp; <a href=”payments.htm”.htm”>Method of Payments</a>&nbsp; | </div>
</body>
</html>

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceApr 08.2006 — It's not working because you created a bunch of little forms and none of the data is in the actual form you are submitting:

<form METHOD="GET" ACTION="/cgi/formmail">

<input TYPE="SUBMIT" VALUE="Submit Request Form">

<input TYPE="RESET" VALUE="Reset Form">

<input type="hidden" name="recipient" value="[email protected]">

</form>
Copy linkTweet thisAlerts:
@Karybear32authorApr 08.2006 — What data do I need to make it work?

Thanks
Copy linkTweet thisAlerts:
@phpnoviceApr 08.2006 — There should be only one set of FORM tags. You have about seven sets.
Copy linkTweet thisAlerts:
@Karybear32authorApr 08.2006 — I redid it but, now I'm getting nothing.. I don't think I have any hair left.

<html>

<head>

<title> Service Request Form</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#FFFFFF" text="#000000">

<p align="center"><font face="Arial, Helvetica, sans-serif" size="+3">Service

Request Form</font></p>

<p align="left"><font face="Arial, Helvetica, sans-serif">Please answer the question

below to the best of your knowledge. It's import to have as much information

as possible to serve you better.</font></p>

<p align="center"><font face="Arial, Helvetica, sans-serif">This form is for Residental

customers only!</font></p>

<hr noshade align="center">

<form METHOD="GET" ACTION="/cgi/formmail">

Today's Date:

<input type="text" name="textfield17">

First Name:

<input type="text" name="textfield">

Last Name:

<input type="text" name="textfield2">

<hr noshade align="center">

Address:

<input type="text" name="textfield3" size="20">

City:

<input type="text" name="textfield4">

State:

<input type="text" name="textfield5" size="10">

Zip:

<input type="text" name="textfield6" size="10">

Phone#:

<input type="text" name="textfield14" size="15">

<hr noshade align="center">

Service address if different:

<input type="text" name="textfield7" size="20">

City:

<input type="text" name="textfield8">

State:

<input type="text" name="textfield9" size="10">

Zip:

<input type="text" name="textfield10" size="10">

<hr noshade align="center">

<p>Please choose one of the following Brands of furnace or A/C that you have

in your home that needs service. Also include Model, Serial and filter size

if you know it.</p>

<p>Brand

<select name="select" size="1">

<option>Choose One</option>

<option>Trane</option>

<option>Lennox</option>

<option>Bryant</option>

<option>Comfortmaker</option>

<option>Coleman</option>

<option>York</option>

<option>Boiler/hot water heat</option>

<option>Amana</option>

<option>Other</option>

</select>

Model#

<input type="text" name="textfield11" size="20">

Serial#

<input type="text" name="textfield12" size="20">

Filter Size:

<input type="text" name="textfield13" size="15">

</p>

<hr noshade align="center">

<p>Please list the nature of your problem below:</p>

<p>

<textarea name="textfield15" cols="75"></textarea>

</p>

<hr noshade align="center">

How will the service tech get into home?

<input type="text" name="textfield16" size="75">

<hr noshade align="center">

<p align="left">If have finished the form and ready to send please click Submit

Service Request button or to reset the form and start over please click the

Clear Form button.</p>

<p align="left">Thank you!</p>

<p>BTU Management</p>

<hr noshade align="center">

<input TYPE="SUBMIT" VALUE="Submit Request Form"> <input TYPE="RESET" VALUE="Reset Form"> <input type="hidden" name="recipient" value="[email protected]">

</form>

<hr noshade align="center">

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

if (window.print) {

document.write('<form>Do not forget to '

+ '<input type=button name=print value="Print" '

+ 'onClick="javascript:window.print()"> this page for your records!</form>');

}

// End -->

</script>

<hr noshade align="center">

<div align="center">|&nbsp; <a href="index.htm">Home </a>&nbsp; |&nbsp; <a href="contact1.htm">Contact

Us</a>&nbsp; |&nbsp; <a href="estimate.htm">Free Estimate Form</a>&nbsp; |&nbsp;

<a href="testimonials.htm">Testimonials</a> &nbsp;|&nbsp; <a href="prices.htm">Prices</a>&nbsp;

|&nbsp; <a href="payments.htm".htm">Method of Payments</a>&nbsp; | </div>

</body>

</html>
Copy linkTweet thisAlerts:
@balloonbuffoonApr 08.2006 — Is "/cgi/formmail" expecting the form to be sent by "GET"? I would think something like that would use "POST". Try changing "GET" to "POST".

Now you're gonna be getting answers in two different places:

https://webdeveloper.com/forum/showthread.php?t=102284

--Steve
Copy linkTweet thisAlerts:
@phpnoviceApr 08.2006 — In addition to changing METHOD="GET" to METHOD="POST", you should add a DOCTYPE to the very top of your page (before the opening HTML tag) and make sure your FORM fields are all within some additional container -- for example <p></p>, <div></div>, etc. This, of course, is if you care anything about W3C standards.
×

Success!

Help @Karybear32 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...