Copy link to clipboard
Copied
Hello!
I am in a pickle!
I have a form and it is effectively sending an email however the input fields are delivered to the email are empty.
Here is the code:
<form><form></form></form><!DOCTYPE html PUBLIC "-//W3C//Dtd html 4.01 transitional//EN">
<html>
<head>
<title>ScagTech web site - Scag University Registration Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="cssbody.css" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 10px}
.style2 {font-size: 14px}
-->
</style>
</head>
<body>
<table width="780" cellpadding="3" cellspacing="0" class="indextable">
<tr>
<td height="21" bgcolor="#990000" class="tbd" norepeat fixed noscroll> SCAG University Registration</td>
</tr>
</table>
<table width="780" cellpadding="3" cellspacing="0" class="indextable">
<tr>
<td valign="top">
<tr bgcolor="#eeeeee">
<td colspan="2" align="LEFT" valign="TOP" height="140"><img src="images/ScagU-logo.gif" alt="ScagU" width="238" height="121" hspace="10" vspace="5" align="left">Use this online form to sign up for Scag University (ScagU). It's FREE and you can get <strong>ScagU Certified.</strong><br>
<br>
<li>Achieve Bronze, Silver and Gold Status
<li>Earn Achievement Medals, Hats and ScagU Certificates
<li>Fine tune your service and selling skills
<li>Bring new employees up to speed faster
<li>Stay up to date on the latest technology and products
<li><strong>Each user signing up for Scag U must have their own email address</strong> and must not share their account with another individual. <strong>It is recommended that generic Service@dealer.com or Sales@dealer.com type emails are not used.</strong> Scag students should be signing up with their own personal email as certification sticks with the individual.<br>
<br>
<strong class="bluebold style2"><br>
Your information will be reviewed at Scag and you will receive your sign-up info, via e-mail, within 24 hours. </strong></td></tr>
<tr valign="top">
<td width="240" align="RIGHT" valign="top"> <br>
<div align="left">
<form action="sendmail-ScagU.asp" method="post" id="ScagUReg">
<p>Dealer Number: <input type="text" size="50" name="dealer_number"></p>
<p>Scag Dealer Name: <input name="dealer_name" type="text" required="required" size="50"></p>
<p>Your Name (First and last): <input name="user_name" type="text" required="required" size="50"></p>
<p>Your Email Address (one account per email):
<input name="email" type="text" required="required" size="50"></p>
<p>Technical Service Training: <input name="Service" type="checkbox"></p>
<p>Sales Training:
<input type="checkbox" name="Sales"></p>
<p><input name="Send" type="submit" formaction="sendmail4.asp" formenctype="text/plain" formmethod="POST" value="Submit"></p>
</form></div></td>
</tr>
<td align="LEFT"><span class="style1"><hr>
By clicking Submit, you accept the terms of use.
I understand the Scag University (ScagU) web site and the data contained within was created by Scag Power
Equipment for the exclusive use of Scag Power Equipment dealer personnel. I agree to use the ScagU web site
for its intended use, a training resource. I understand that the login name and password I am given to access this
site are confidential and cannot be shared. I understand that the information contained within the ScagU web site
is confidential and is only to be viewed by authorized Scag Power Equipment dealer and distributor personnel and
may not be duplicated, or distributed in any way, shape or form. I accept that not following these requirements
may lead to the immediate loss of all ScagU web site privileges and possible additional consequences. By signing
this document, I agree to the above terms and conditions, and acknowledge that I currently am employed by an
active, authorized Scag Power Equipment Dealer or Distributor.</span>
</tr>
</table>
<br>
</td>
</tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-5713986-4");
pageTracker._trackPageview();
} catch(err) {}</script></body>
</html>
Copy link to clipboard
Copied
If you need this fast, switch to a 3rd party form service like Wufoo.com or JotForms.com
Data is collected and processed by their servers instead of yours.
Hope that helps.
Copy link to clipboard
Copied
@Julie2962732409lf - A few things I am noticing in addition to what was said.
There are some random code errors throughout the page. The one that jumps out at me the most is your form on the page has a different action then the submit button. And seeing as how the sendmail has your brand "scagu" in it, I would assume that this script has been modified from its original source and probably needs to be manually reviewed.
As your page appears to potentially be related to a LMS (Learning Management System), I would first consider whether your script is tied to the larger University offering. If it is just a standalone mail script and you do manual work to register users, I would take the previous recommendation into consideration to setup a quick form script. Alternatively if you have a marketing platform like a Hubspot/Marketo/etc, you could use that as well.
Copy link to clipboard
Copied
You have conflicting form actions within the same <form>. There should be only ONE form action.
In the 1st instance you have this:
<form action="sendmail-ScagU.asp" method="post" id="ScagUReg">
In the 2nd, you have something else:
<input name="Send" type="submit" formaction="sendmail4.asp" formenctype="text/plain" formmethod="POST" value="Submit">
Copy link to clipboard
Copied
I resolved my issue. How I have no clue. Trial and error. Copying the code from a different form on our site and making sure my "input name" matches the .asp it was directed to.
Thank you for your efforts.
Form:
<form method="POST" action="sendmail4.asp" onSubmit="return submitForm()">
<p>Dealer Number: <input type="text" size="30" name="dealer_number"></p>
<p>Dealer Name: <input type="text" size="30" name="dealer_name"></p>
<p>Your Name: <input type="text" size="30" name="user_name"></p>
<p>Your Email Address: <input type="text" size="30" name="email"></p>
<p>Technical Service Training: <input name="Service" type="checkbox"></p>
<p>Sales Training: <input type="checkbox" name="Sales"></p>
<p><input id="submit" type="submit" name="Send" value="Submit"></p>
.asp
strBody = Trim(Request.Form("dealer_name"))
strBody1 = Trim(Request.Form("dealer_number"))
strBody2 = Trim(Request.Form("user_name"))
strBody3 = Trim(Request.Form("email"))
strBody4 = Trim(Request.Form("Service"))
strBody5 = Trim(Request.Form("Sales"))
Copy link to clipboard
Copied
When in doubt, revert to the one that works.
Glad you got it sorted.
Copy link to clipboard
Copied
I resolved my issue. How I have no clue. Trial and error. Copying the code from a different form on our site and making sure my "input name" matches the .asp it was directed to.
Thank you for your efforts.
Form:
<form method="POST" action="sendmail4.asp" onSubmit="return submitForm()">
<p>Dealer Number: <input type="text" size="30" name="dealer_number"></p>
<p>Dealer Name: <input type="text" size="30" name="dealer_name"></p>
<p>Your Name: <input type="text" size="30" name="user_name"></p>
<p>Your Email Address: <input type="text" size="30" name="email"></p>
<p>Technical Service Training: <input name="Service" type="checkbox"></p>
<p>Sales Training: <input type="checkbox" name="Sales"></p>
<p><input id="submit" type="submit" name="Send" value="Submit"></p>
.asp
strBody = Trim(Request.Form("dealer_name"))
strBody1 = Trim(Request.Form("dealer_number"))
strBody2 = Trim(Request.Form("user_name"))
strBody3 = Trim(Request.Form("email"))
strBody4 = Trim(Request.Form("Service"))
strBody5 = Trim(Request.Form("Sales"))
By @Julie2962732409lf
It looks like the original problem we detected was resolved. On your problem version your form action was pointing to a file "sendmail-ScagU.asp" instead of sendmail4.asp in your revised version. Also that sendmail4 was the action of the submit button in the non-working version so likely the conflicting form/submit button actions led to issues with the submission passing data to the email.