Resending since my last post was too long. 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> & 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 if I need to use 
each "name" and "id" for every form field (i.e. input)?  If so, is not 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 & that would 
be a nightmare making the database not easy to read.  Please help!

<!--  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: Fields are optional. Please uncomment 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="email">Email</label><input  id="email" maxlength="80" name="email" 
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>
<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:

<html>
<head>
<!--- Begin Variables to be posted by ColdFusionMX v7.0 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">
<!--- Start ColdFusion Insert to myDatabase on myWebServer Section --->
<CFINSERT DATASOURCE="TestDBAll" TABLENAME="Subscribers">
<!--- Via ColdFusion-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">
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>

Thank you in advance - Sifu 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:345985
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to