function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nagendra SinghNagendra Singh 

The following code was generated for a simple web-to-lead form. The problem is that it is not mapping to the proper lead record type (see underline )

<!--  ----------------------------------------------------------------------  -->
<!--  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="00Dd0000000eN2u”>
<input type=hidden name id=“recordType” id=“recordType” value=“012d0000000SMtA">
<input type=hidden name="retURL" value="http://ENTERRETURNURLHERE.COM">

<!--  ----------------------------------------------------------------------  -->
<!--  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="cassandra.ramirez0107@gmail.com">                                -->
<!--  ----------------------------------------------------------------------  -->

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

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

Home Mailing Address:<textarea  aria-labelledby="00Nd0000005FLPm_pcl" id="00Nd0000005FLPm" name="00Nd0000005FLPm" type="text" wrap="soft"></textarea><br>

Social Security Number:<input  aria-labelledby="00Nd0000005FEvB_pcl" id="00Nd0000005FEvB" maxlength="9" name="00Nd0000005FEvB" size="20" type="text" /><br>

Preferred Phone:<select  id="00Nd0000004XgBJ" name="00Nd0000004XgBJ" title="Preferred Phone"><option value="">--None--</option><option value="Home">Home</option>
<option value="Work">Work</option>
<option value="Mobile">Mobile</option>
<option value="Other">Other</option>
</select><br>

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

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

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

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

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

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

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

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

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

Date Business Established:<span class="dateInput dateOnlyInput"><input  aria-labelledby="00Nd0000005FLLV_pcl" id="00Nd0000005FLLV" name="00Nd0000005FLLV" size="12" type="text" /></span><br>

Start Up or Existing Business?:<select  id="00Nd0000005Fboy" name="00Nd0000005Fboy" title="Start Up or Existing Business?"><option value="">--None--</option><option value="Start Up">Start Up</option>
<option value="Existing">Existing</option>
</select><br>

File personal/business taxes w/in 3 yrs?:<select  id="00Nd0000005FboE" name="00Nd0000005FboE" title="File personal/business taxes w/in 3 yrs?"><option value="">--None--</option><option value="Yes">Yes</option>
<option value="No">No</option>
</select><br>

Did you file taxes w/in the past 3 yrs?:<select  id="00Nd0000005Fbp8" name="00Nd0000005Fbp8" title="Did you file taxes w/in the past 3 yrs?"><option value="">--None--</option><option value="Yes">Yes</option>
<option value="No">No</option>
</select><br>

Loan Amount Requested:<input  aria-labelledby="00Nd0000005FbpS_pcl" id="00Nd0000005FbpS" name="00Nd0000005FbpS" size="20" type="text" /><br>

Purpose of Loan:<textarea  aria-labelledby="00Nd0000005FLQa_pcl" id="00Nd0000005FLQa" name="00Nd0000005FLQa" type="text" wrap="soft"></textarea><br>

<label for="revenue" id="revenue_pcl">Annual Revenue</label><input  aria-labelledby="revenue_pcl" id="revenue" name="revenue" size="20" type="text" /><br>

I am Currently Serving in the Military:<input  aria-labelledby="00Nd0000005FpIx_pcl" id="00Nd0000005FpIx" name="00Nd0000005FpIx" type="checkbox" value="1" /><br>

Dates of Military Service:<input  aria-labelledby="00Nd0000005FpIt_pcl" id="00Nd0000005FpIt" maxlength="100" name="00Nd0000005FpIt" size="20" type="text" /><br>

Military Branch:<input  aria-labelledby="00Nd0000005FpJ2_pcl" id="00Nd0000005FpJ2" maxlength="100" name="00Nd0000005FpJ2" size="20" type="text" /><br>

Military Discharge Status:<select  id="00Nd0000005FpJv" name="00Nd0000005FpJv" title="Military Discharge Status"><option value="">--None--</option><option value="Honorable">Honorable</option>
<option value="Dishonorable">Dishonorable</option>
</select><br>

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

</form>
Virendra ChouhanVirendra Chouhan
Hi 

I think the problem is in attributes.
see name and id 
<input type=hidden name id=“recordType” id=“recordType” value=“012d0000000SMtA">

Remove this and it'll work

input type=hidden name=“recordType” id=“recordType” value=“012d0000000SMtA">

Regards
Virendra
James LoghryJames Loghry
Virendra is likely correct in that it's probably the attributes causing your issue.  Another thing that could cause issues is that your web to lead form is sending the leads to production.  If on the offchance you're trying to test this in sandbox, then you would need to change the action attribute in your form to https://csXX.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8, where XX is the the pod your sandbox is on.
srlawr uksrlawr uk
I concur with both the above answers! The HTML attribute is wrong on your hidden field.

(if you noticed my sneaky edit here.. took me a second to realise what I'd said isn't how it worked!)

I thought I'd post to add to James' answer regarding flipping between production and Sandboxes does require you to change the action of the form from a production case to a sandbox instance (www.salesforce... to csXX.salesforce...) - but doing this also requires you to change the otherwise hard coded record type ID (the value of the hidden field) to whatever ID references the record type in your sandbox... as these will be different between instances.