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
Alicia1962Alicia1962 

Word Press - Web to Lead form not submitting in Salesforce

IT worked in development box, but now it is not submitting. However, the email notification from the code is sending properly.

Here is the code:

<h3>My Client Needs Help with the Following:</h3>
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST" id="sforce">
<input type=hidden name="oid" value="00DA0000000Hosi">
<input type=hidden name="retURL" value="http://bhhs.isearchdecor.com">

<fieldset>
<input  id="00NG000000EUw6I" name="00NG000000EUw6I" type="checkbox" value="1" /> Vendor Quotes for Services, Decor or Home Improvements
</fieldset>
<fieldset>
<input  id="00NG000000EUw68" name="00NG000000EUw68" type="checkbox" value="1" /> Repair Quotes from BINSR or Home Inspection (send report to bhhsAZ@isearchdecor.com)
</fieldset>
<fieldset>
<input  id="00NG000000EUw6D" name="00NG000000EUw6D" type="checkbox" value="1" /> Staging Consultation or Proposal
</fieldset>
<fieldset>
<input  id="00NG000000ETpq7" name="00NG000000ETpq7" type="checkbox" value="1" /> Utility Connections
</fieldset>
<fieldset>
<input  id="00NG000000ETppx" name="00NG000000ETppx" type="checkbox" value="1" /> Home Insurance Quotes
</fieldset>
<fieldset>
<label>Contract Date:</label><input  id="00NG000000ETpn8" name="00NG000000ETpn8" size="12" type="date" />
</fieldset>
<fieldset>
<label>Closing Date:</label><input  id="00NG000000DxHcO" name="00NG000000DxHcO" size="12" type="date" />
</fieldset>
<fieldset>
<label>Details of Request:</label><textarea  id="00NG000000ETpt6" name="00NG000000ETpt6" type="text" wrap="soft"></textarea>
</fieldset>
<h3>Client Profile:</h3>
<fieldset>
<label for="first_name">Client First Name:</label><input id="first_name" maxlength="40" name="first_name" size="20" type="text" />
</fieldset>
<fieldset>
<label for="last_name">Client Last Name:</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" />
</fieldset>
<fieldset>
<label for="email">Client Email:</label><input  id="email" maxlength="80" name="email" size="20" type="text" />
</fieldset>
<fieldset>
<label for="phone">Client Phone:</label><input  id="phone" maxlength="40" name="phone" size="20" type="text" />
</fieldset>
<fieldset>
<label for="street">Client Property Address:</label><textarea name="street"></textarea>
</fieldset>
<fieldset>
<label for="city">Client City:</label><input  id="city" maxlength="40" name="city" size="20" type="text" />
</fieldset>
<fieldset>
<label for="zip">Client Zip:</label><input  id="zip" maxlength="20" name="zip" size="20" type="text" />
</fieldset>
<h3>Agent Profile:</h3>
<fieldset>
<label>Agent Name:</label><input  id="00NG000000Dx7oX" maxlength="100" name="00NG000000Dx7oX" size="20" type="text" />
</fieldset>
<fieldset>
<label>Agent Email:</label><input  id="00NG000000Dx7om" maxlength="80" name="00NG000000Dx7om" size="20" type="text" />
</fieldset>
<fieldset>
<label>Agent Phone:</label><input  id="00NG000000Dx7or" maxlength="40" name="00NG000000Dx7or" size="20" type="text" /><br>
</fieldset>
<fieldset>
<label>BHHS AZ Branches:</label><select  id="00NG000000ET9Uq" name="00NG000000ET9Uq" title="BHHS AZ Branches"><option value="">--Select--</option><option value="N. Phoenix">N. Phoenix</option><option value="Kierland">Kierland</option><option value="N. Scottsdale/Troon">N. Scottsdale/Troon</option><option value="Cave Creek">Cave Creek</option><option value="Goodyear">Goodyear</option><option value="Fountain Hills">Fountain Hills</option><option value="Gilbert/Mesa">Gilbert/Mesa</option><option value="Tempe">Tempe</option><option value="Camelback">Camelback</option></select>
</fieldset>
<fieldset>
<label>PDF Flyer:</label><input  id="00NG000000EUUbD" name="00NG000000EUUbD" type="checkbox" value="1" />Send digital headshot images to bhhsAZ@isearchdecor.com
</fieldset>
<fieldset>
<label>Listing Riders Qty. Maximum 5 per order, may take 2-3 weeks for delivery:</label><input  id="00NG000000EUUu5" name="00NG000000EUUu5" size="2" type="text" />
</fieldset>
<fieldset>

<input type="submit" name="submit" id="formSubmit" value="Submit Your Request" />
</fieldset>
</form>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var fSubmit = false;
$('form#sforce fieldset input[type="submit"]').click(function() {
$('form#sforce fieldset input[type="text"], form#sforce fieldset textarea, form#sforce fieldset select').css({'background':'#FFF','color':'#333'});
var fName = $('form#sforce fieldset input[name="first_name"]');
if(fName.val()==''){
fName.css({'background':'#F78080','color':'#FFF'});
fName.focus();
return false
}
var lName = $('form#sforce fieldset input[name="last_name"]');
if(lName.val()==''){
lName.css({'background':'#F78080','color':'#FFF'});
lName.focus();
return false
}
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
var cEmail = $('form#sforce fieldset input[name="email"]');
if(cEmail.val()=='' || !emailReg.test(cEmail.val())){
cEmail.css({'background':'#F78080','color':'#FFF'});
cEmail.focus();
return false
}
var cPhone = $('form#sforce fieldset input[name="phone"]');
if(cPhone.val()==''){
cPhone.css({'background':'#F78080','color':'#FFF'});
cPhone.focus();
return false
}
var street = $('form#sforce fieldset textarea[name="street"]');
if(street.val()==''){
street.css({'background':'#F78080','color':'#FFF'});
street.focus();
return false
}
var city = $('form#sforce fieldset input[name="city"]');
if(city.val()==''){
city.css({'background':'#F78080','color':'#FFF'});
city.focus();
return false
}
var zip = $('form#sforce fieldset input[name="zip"]');
if(zip.val()==''){
zip.css({'background':'#F78080','color':'#FFF'});
zip.focus();
return false
}
var info = $('form#sforce fieldset textarea[name="00NG000000ETpt6"]');
if(info.val()==''){
info.css({'background':'#F78080','color':'#FFF'});
info.focus();
return false
}
var aName = $('form#sforce fieldset input[name="00NG000000Dx7oX"]');
if(aName.val()==''){
aName.css({'background':'#F78080','color':'#FFF'});
aName.focus();
return false
}
var aEmail = $('form#sforce fieldset input[name="00NG000000Dx7om"]');
if(aEmail.val()=='' || !emailReg.test(aEmail.val())){
aEmail.css({'background':'#F78080','color':'#FFF'});
aEmail.focus();
return false
}
var aPhone = $('form#sforce fieldset input[name="00NG000000Dx7or"]');
if(aPhone.val()==''){
aPhone.css({'background':'#F78080','color':'#FFF'});
aPhone.focus();
return false
}
var branch = $('form#sforce fieldset select[name="00NG000000ET9Uq"]');
if(branch.find('option:selected').val()==''){
branch.css({'background':'#F78080','color':'#FFF'});
alert('Please select a branch!')
return false
}
var dataString = 'info=' + $('textarea[name="00NG000000ETpt6"]').val();
if($('input[name="00NG000000EUw6I"]').is(':checked')){
dataString += '&vQuotes=1';
}
if($('input[name="00NG000000EUw68"]').is(':checked')){
dataString += '&rQuotes=1';
}
if($('input[name="00NG000000EUw6D"]').is(':checked')){
dataString += '&staging=1';
}
if($('input[name="00NG000000ETpq7"]').is(':checked')){
dataString += '&connections=1';
}
if($('input[name="00NG000000ETppx"]').is(':checked')){
dataString += '&iQuotes=1';
}
if($('input[name="00NG000000EUUbD"]').is(':checked')){
dataString += '&pdf=1';
}
if($('input[name="00NG000000EUUu5"]').val()!=''){
dataString += '&qty=1';
}
dataString += '&cDate=' + $('input[name="00NG000000ETpn8"]').val();
dataString += '&eDate=' + $('input[name="00NG000000DxHcO"]').val();
dataString += '&fName=' + fName.val();
dataString += '&lName=' + lName.val();
dataString += '&cEmail=' + cEmail.val();
dataString += '&cAddress=' + street.val();
dataString += '&cPhone=' + cPhone.val();
dataString += '&cCity=' + city.val();
dataString += '&cZip=' + zip.val();
dataString += '&aName=' + aName.val();
dataString += '&aEmail=' + aEmail.val();
dataString += '&aPhone=' + aPhone.val();
dataString += '&branches=' + branch.find('option:selected').val();
$.ajax({
type: 'GET',
url:  'http://bhhs.isearchdecor.com/wp-content/themes/moesia/processor.email.php',
cache: 'false',
data: dataString,
success: function(data) {
document.location.href = "http://bhhs.isearchdecor.com/";
}
});
return fSubmit
});

</script>
<br><br>
Vendors have been initially screened as described in our <a href="http://www.isearchdecor.com/blog/vendor-approval-process">Vendor Approval Process.</a> iSearchDecor makes no guarantees or representations regarding vendors skills nor the quality of the products and services offered. Clients enter into direct agreements with vendors. To view our complete policy, refer to our <a href="http://www.isearchdecor.com/terms_conditions">Terms and Conditions.</a>
Phil WeinmeisterPhil Weinmeister

Hi Alicia,

You probably figured this out by now, but you can include these debugging lines:

<input type="hidden" name="debug" value=1>
<input type="hidden" name="debugEmail" value="youremail@yourdomain.com">

That should help you diagnose the issue.

Thanks,
Phil