Help with autoresponder form code

4 replies
I'm having a heck of a time figuring out how to get my custom designed form to incorporate with my autoresponder. I have a section on my website asking for name and email with a button that when clicked should lead to my autoresponder. I have no idea how to set that up. I have a form from a template that the autoresponder service gives me. How do I combine the two so that the person visiting my website can enter their name and email click the submit button and their info goes to my autoresponder with out having to use the ugly template form the autoresponder service gives me? I have pasted the two sets of code I have. If anyone has any insight as to what I would need to do I would love to hear it. Thanks.

Here is the HTML code for the sumbit form box on my website:
</div>
<div class="row">
<div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-2 col-md-offset-2 col-sm-offset-2">
<div class="report">
<div class="row">
<div class="report_logo">
<img src="images/advertizing%20report.png" alt="">
<div class="report_logo_text">
<h5>Free</h5>
<p>Advertising E-Book</p>
</div>
</div>
</div>

<div class="row">
<div class="report_contact">

<div class="report_info left">
<form action="action_page.php" method="POST">
Name: <input type="text" size="8" maxlength="40" name="name" placeholder="">
<br>
<div class="email">

<form action="action_page.php" method="POST">
email: <input type="text" size="8" maxlength="40" name="name" placeholder="">
</form>

</div>
</form>
</div>

<div class="submit left">
<form action="action_page.php" method="POST">

<input type="submit" value="Get&#x00A;Report&#x00A;">
</form>
</div>

</div>

And here is the code from the form autogenerated:

<body>
<!--
Do not modify the NAME value of any of the INPUT fields
the FORM action, or any of the hidden fields (eg. input type=hidden).
These are all required for this form to function correctly.
-->
<style type="text/css">

.myForm td, input, select, textarea, checkbox {
font-family: tahoma;
font-size: 12px;
}

.required {
color: red;
}

</style>
<form method="post" action="http://mbgrey.com/email/form.php?form=2" id="frmSS2" onsubmit="return CheckForm2(this);">
<table border="0" cellpadding="2" class="myForm">
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;First Name:</td>
<td><input type="text" name="CustomFields[2]" id="CustomFields_2_2" value="" size='50'></td>
</tr><tr>
<td><span class="required">*</span>&nbsp;
Your Email Address:</td>
<td><input type="text" name="email" value="" /></td>
</tr><tr>
<td><span class="required">*</span>&nbsp;
Preferred Format:</td>
<td><select name="format"><option value="h">HTML</option><option value="t">Text</option></select></td>
</tr><tr>
<td><span class="required">*</span>&nbsp;
Enter the security code shown:</td>
<td><script type="text/javascript">
// <![CDATA[
if (!Application) var Application = {};
if (!Application.Page) Application.Page = {};
if (!Application.Page.ClientCAPTCHA) {
Application.Page.ClientCAPTCHA = {
sessionIDString: '',
captchaURL: [],
getRandomLetter: function () { return String.fromCharCode(Application.Page.ClientCAPTCHA .getRandom(65,90)); },
getRandom: function(lowerBound, upperBound) { return Math.floor((upperBound - lowerBound + 1) * Math.random() + lowerBound); },
getSID: function() {
if (Application.Page.ClientCAPTCHA.sessionIDString.le ngth <= 0) {
var tempSessionIDString = '';
for (var i = 0; i < 32; ++i) tempSessionIDString += Application.Page.ClientCAPTCHA.getRandomLetter();
Application.Page.ClientCAPTCHA.sessionIDString.len gth = tempSessionIDString;
}
return Application.Page.ClientCAPTCHA.sessionIDString;
},
getURL: function() {
if (Application.Page.ClientCAPTCHA.captchaURL.length <= 0) {
var tempURL = 'http://mbgrey.com/email/admin/resources/form_designs/captcha/index.php?c=';

tempURL += Application.Page.ClientCAPTCHA.getRandom(1,1000);
tempURL += '&ss=' + Application.Page.ClientCAPTCHA.getSID();
Application.Page.ClientCAPTCHA.captchaURL.push(tem pURL);
}
return Application.Page.ClientCAPTCHA.captchaURL;
}
}
}

var temp = Application.Page.ClientCAPTCHA.getURL();
for (var i = 0, j = temp.length; i < j; i++) document.write('<img src="' + temp[i] + '" alt="img' + i + '" />');
// ]]>
</script>
<br/><input type="text" name="captcha" value="" /></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Subscribe" />
<br/>
</td>
</tr>
</table>
</form>

<script type="text/javascript">
// <![CDATA[

function CheckMultiple2(frm, name) {
for (var i=0; i < frm.length; i++)
{
fldObj = frm.elements[i];
fldId = fldObj.id;
if (fldId) {
var fieldnamecheck=fldObj.id.indexOf(name);
if (fieldnamecheck != -1) {
if (fldObj.checked) {
return true;
}
}
}
}
return false;
}
function CheckForm2(f) {
var email_re = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
if (!email_re.test(f.email.value)) {
alert("Please enter your email address.");
f.email.focus();
return false;
}

if (f.format.selectedIndex == -1) {
alert("Please choose a format to receive your email campaigns in");
f.format.focus();
return false;
}

if (f.captcha.value == "") {
alert("Please enter the security code shown");
f.captcha.focus();
return false;
}

return true;
}

// ]]>
</script>
<!-- end of script for autoresponder script -->
</body>

If anyone knows where to start please let me know. Thanks.
#autoresponder #code #form
  • Profile picture of the author rhinocl
    You take the account that is receiving the emails from the form (it shouldn't be getting anything else) and you go into your cpanel and create an autoresponder that answers these. The settings are self explanatory. You can't build a whole series that way. If you want that you may need a WordPress autoresponder plugin, but the principle is the same- the target email for the form is hooked up to the autoresponder.
    {{ DiscussionBoard.errors[9978883].message }}
  • Profile picture of the author topnichewebsites
    The only part you need is <form> ................</form> from the autorepsonder company. All other skinning is done outside of that and maybe a little inside that custom submit button.

    Mike
    Signature
    http://pixelcovers.com/ <- eBook add eCovers

    https://www.unicommercesolutions.com <- WordPress Websites and Maintenance
    {{ DiscussionBoard.errors[9978929].message }}
    • Profile picture of the author japaneseboxcut
      Thank you very much, I was able to get it to work. Thanks.
      {{ DiscussionBoard.errors[9980259].message }}
  • Profile picture of the author topnichewebsites
    No problem and congrats !

    Mike
    Signature
    http://pixelcovers.com/ <- eBook add eCovers

    https://www.unicommercesolutions.com <- WordPress Websites and Maintenance
    {{ DiscussionBoard.errors[9980652].message }}

Trending Topics