Thank you for your help, however the CFC is a little over my head.  Below is 
the HTML generated by SalesForce.com Web-To-Lead.  It works well by itself but 
not in the ColdFusion <CFFORM> and then passing the info to my "insert2a.cfm 
page (shown below).  I really think the problem is somewhere in the first few 
lines of the "insert2a.cfm" page with the <CFHTTP> and <CFHTTPPARAM>.  I am 
also not sure if in the <CFFORM> page maybe I need to use each "name" and "id" 
for every form field (i.e. input)?  If so, is not just the "id" enough because 
if I have to change the "name" to the long alpha-numeric characters generated 
by salesforce.com (i.e. id="00N50000001WzP0") that would mean I would have to 
change all my database field labels as well and that would be a nightmare as 
well as make the database not very easy to read.  Please help!

<!--  ----------------------------------------------------------------------  
-->
<!--  NOTE: Please add the following <META> element to your page <HEAD>.      
-->
<!--  If necessary, please modify the charset parameter to specify the        
-->
<!--  character set of your HTML page.                                        
-->
<!--  ----------------------------------------------------------------------  
-->

<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">

<!--  ----------------------------------------------------------------------  
-->
<!--  NOTE: Please add the following <FORM> element to your page.             
-->
<!--  ----------------------------------------------------------------------  
-->

<form 
action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"; 
method="POST">

<input type=hidden name="oid" value="00D500000007A2e">
<input type=hidden name="retURL" 
value="http://www.mycompany.com/index.cfm?page=ThankYou";>

<!--  ----------------------------------------------------------------------  
-->
<!--  NOTE: These fields are optional debugging elements.  Please uncomment   
-->
<!--  these lines if you wish to test in debug mode.                          
-->
<!--  <input type="hidden" name="debug" value=1>                              
-->
<!--  <input type="hidden" name="debugEmail"                                  
-->
<!--  value="[email protected]">                                    -->
<!--  ----------------------------------------------------------------------  
-->

Lead Date:<span class="dateInput dateOnlyInput"><input  id="00N50000001WzP0" 
name="00N50000001WzP0" size="12" type="text" /></span><br>

<label for="first_name">First Name</label><input  id="first_name" 
maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" 
name="last_name" size="20" type="text" /><br>

<label for="title">Title</label><input  id="title" maxlength="40" name="title" 
size="20" type="text" /><br>

<label for="company">Company</label><input  id="company" maxlength="40" 
name="company" size="20" type="text" /><br>

<label for="street">Address</label><textarea name="street"></textarea><br>

<label for="city">City</label><input  id="city" maxlength="40" name="city" 
size="20" type="text" /><br>

<label for="state">State/Province</label><input  id="state" maxlength="20" 
name="state" size="20" type="text" /><br>

<label for="zip">Zip</label><input  id="zip" maxlength="20" name="zip" 
size="20" type="text" /><br>

<label for="country">Country</label><input  id="country" maxlength="40" 
name="country" size="20" type="text" /><br>

<label for="phone">Phone</label><input  id="phone" maxlength="40" name="phone" 
size="20" type="text" /><br>

Phone 2:<input  id="00N50000001WyeF" maxlength="40" name="00N50000001WyeF" 
onkeydown="formatPhoneOnEnter(this, event);" size="20" type="text" /><br>

<label for="fax">Fax</label><input  id="fax" maxlength="40" name="fax" 
size="20" type="text" /><br>

<label for="mobile">Mobile</label><input  id="mobile" maxlength="40" 
name="mobile" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" 
size="20" type="text" /><br>

Email 2:<input  id="00N50000001WzPZ" maxlength="80" name="00N50000001WzPZ" 
size="20" type="text" /><br>

<label for="URL">Website</label><input  id="URL" maxlength="80" name="URL" 
size="20" type="text" /><br>

IR-01:<input  id="00N50000001WzPP" name="00N50000001WzPP" type="checkbox" 
value="1" /><br>

IR-02:<input  id="00N500000026KOT" name="00N500000026KOT" type="checkbox" 
value="1" /><br>

IR-05:<input  id="00N50000001Wyd4" name="00N50000001Wyd4" type="checkbox" 
value="1" /><br>

IR-12:<input  id="00N500000026KOY" name="00N500000026KOY" type="checkbox" 
value="1" /><br>

CR-025:<input  id="00N50000001Wyd5" name="00N50000001Wyd5" type="checkbox" 
value="1" /><br>

CR-050:<input  id="00N5000000292MR" name="00N5000000292MR" type="checkbox" 
value="1" /><br>

CR-070:<input  id="00N5000000292MW" name="00N5000000292MW" type="checkbox" 
value="1" /><br>

CR-140:<input  id="00N5000000292Mb" name="00N5000000292Mb" type="checkbox" 
value="1" /><br>

CR-210:<input  id="00N5000000292Mg" name="00N5000000292Mg" type="checkbox" 
value="1" /><br>

CR-280:<input  id="00N5000000292Ml" name="00N5000000292Ml" type="checkbox" 
value="1" /><br>

CR-350:<input  id="00N5000000292Mv" name="00N5000000292Mv" type="checkbox" 
value="1" /><br>

CR-420:<input  id="00N5000000292N0" name="00N5000000292N0" type="checkbox" 
value="1" /><br>

CR-490:<input  id="00N5000000292N5" name="00N5000000292N5" type="checkbox" 
value="1" /><br>

Automation:<input  id="00N50000001WygP" name="00N50000001WygP" type="checkbox" 
value="1" /><br>

Loader:<input  id="00N50000001WygU" name="00N50000001WygU" type="checkbox" 
value="1" /><br>

Silo:<input  id="00N50000001WygX" name="00N50000001WygX" type="checkbox" 
value="1" /><br>

Pre-Owned Equip:<input  id="00N50000001Wyfk" name="00N50000001Wyfk" 
type="checkbox" value="1" /><br>

Parts:<input  id="00N50000001WyeC" name="00N50000001WyeC" type="checkbox" 
value="1" /><br>

Custom Equipment:<input  id="00N5000000292Ny" name="00N5000000292Ny" 
type="checkbox" value="1" /><br>

Seminar:<input  id="00N50000001WyhO" name="00N50000001WyhO" type="checkbox" 
value="1" /><br>

OST-On-Site Training:<input  id="00N50000001WyhK" name="00N50000001WyhK" 
type="checkbox" value="1" /><br>

OSM-Preventative Maintenance:<input  id="00N50000001WyhL" 
name="00N50000001WyhL" type="checkbox" value="1" /><br>

OSI-Installation:<input  id="00N50000001WyhP" name="00N50000001WyhP" 
type="checkbox" value="1" /><br>

Tech Support:<input  id="00N50000001WygY" name="00N50000001WygY" 
type="checkbox" value="1" /><br>

Extended Warranty:<input  id="00N50000001WyhJ" name="00N50000001WyhJ" 
type="checkbox" value="1" /><br>

Plant Layout &amp; Design Consulting:<input  id="00N50000001WyeD" 
name="00N50000001WyeD" type="checkbox" value="1" /><br>

Project Engineering:<input  id="00N50000001WyhI" name="00N50000001WyhI" 
type="checkbox" value="1" /><br>

<input type="submit" name="submit">

</form>

So, here is the full insert2a.cfm page that the <cfform method="post" 
action="insert2a.cfm" name="RegisterForm">sends you to:

<!--- Begin Insert Section --->
<html>
<head>
<!--- Begin Variables to be posted to Salesforce.com at this URL --->
<cfhttp 
url="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"; 
method="post" resolveurl="Yes">
<cfhttpparam type="FORMFIELD" name="FirstName" value="#form.FirstName#">
<cfhttpparam type="URL" value="cfhttp" name="Test1">
</cfhttp>
<input type=hidden name="oid" value="00D500000007A2e">

<!--- End Variables to be posted to Salesforce.com at this URL --->

<CFINSERT DATASOURCE="TestDBAll" TABLENAME="Subscribers">

<!--- End Insert Section --->

<cfcookie NAME="Subscriber" VALUE="Subscriber" EXPIRES="1" 
DOMAIN=".mycompany.com">

<!--- Send the message to yourself, when the user posts it on your site. --->

 <CFMAIL to="[email protected]" from="#form.Email#" Subject="New User 
Requests Information" type="html">
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> New User 
Requests Information<br>
  <br>
  <strong>#form.CompanyName#</strong><br>
  #form.FirstName# #form.LastName# - #form.Title# <br>
  #form.Address#<br>
  #form.City#, #form.StateProv# #form.StateProv2# #form.Zip#<br>
  #form.Country# <br>
  #form.Phone# <br>
  <a href="mailto:#Email#";><strong>#form.Email#</strong></a><br>
  </CFMAIL>

<!--- Send one to the person writing, thanking them and reminding them what 
they wrote. --->

        <CFMAIL to="#form.Email#" from="[email protected]"  Subject="Thank 
you for your request" type="html">
          <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Thank 
you <strong>#form.FirstName#</strong> for requesting information from 
mycompany. <br>
          <br>
   </CFMAIL>
</body>
</html> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345901
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to