You need to sign in to do that
Don't have an account?
Web to Lead Form: Lead Record Type Issue
We have 2 web-to-lead forms on our new website. Both forms use the exact same fields - we just want them to come in as different Lead Record Types.
In order to do this, i added the fields we need in your code generator and included the lead record type as a field. When we developed the form, the Lead Record Type field is hidden to the user, so depending on the form they're on, it automatically sends the Lead Record Type we want into sales force.
The correct code for the record type is passing to salesforce. However, every lead is coming in as the same record type: "Other."
I have some screenshots of what we're passing to SF as well as the code SF generated for the form in the first place. But I figured I'd give the overview before we got into the details.
Any help here would be greatly appreciated.
Thank you.
Garett,
Here is your updated Web-2-Lead form
update your code as per instruction , and then try it
Hope this will help you
Thanks,
Bala
All Answers
Hi,
Ideally when you generate the web-to-lead web form , then it generates HTMl wherein the record type Select box is generated.
So I am presuming that you must have made some changes in the HTML thus generated by the web-to-lead functionality to ensure that it rendered as a hidden field with the necessary value and id.
Is this what you have done?
If yes, then it might have so happened that you might have missed something in the process?
I would suggest you to investigate the following:-
1. Please chack that ID of the hideen field meant for "Record type" is correct
2. also acertain that you are setting a value for the hiden field and that value is appropriate , you have to mention the record id of the related record type in the value attribute of the hidden field.
In case the above are fine , then do please share further details of the issue encountered by you.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Ispita -
Thanks for the quick response. We did the standard tests to make sure we had everything right and things do seem to check out. We even ran a test to see what the value being passed to salesforce was in salesforce's url and it was correct. I have a screen shot of this as well as the code provided to us by SF. I can also show you the forms we are developing. What is the best way to share this with you?
Garrett
If possible you can post the screen shots and code here .
ere is the code we got from SF when we added the Lead Record Type field to our form. There are 4 types of leads for this company: Other Leads, Web Leads, Report Request Leads, and White Paper Leads. In this particular form, we want it to be passed as a "Web Lead."
<label for="recordType">Lead Record Type</label><select id="recordType"><option value="">--None--</option><option value="01230000000mEvq">Other Leads</option>
<option value="01230000000mEvh">Report Requests</option>
<option value="01230000000mEvg">Web Lead</option>
<option value="01230000000mEvl">White Paper Lead</option>
</select><br>
Here is the code that is in our form that hides this field from the user and selects the appropriate lead record type automatically:
<label for="description" class="contact_label">Description</label><label for="required" class="contact_required">* required fields</label><br /> <textarea></textarea>
<input id="00N30000005oaHS" style="background: none; height: auto !important; width: auto !important;" value="1" class="check_input" checked="checked" /><label for="optin" class="optin">Yes, keep me informed of what's new at Aircuity and their successes.</label><br />
<select id="recordType" style="display:none;"><option value="01230000000mEvg" selected>Web Lead</option></select>
<span class="error" style="display:none;">Fill in all required fields.</span><input id="contact_submit" class="contact_submit" value="Submit »">
</form>
When we send the information, we get the notification from https://salesforce.com/servlet.WebToLead?encoding=UTF-8 and the lead record type being passed is 01230000000mEvg, which is in fact the value for Web Lead. Not sure what else to do here...
Thanks for your help.
Hi Garrett,
Please remove all the code that you add for your Record Type Logic in your form,
Just add a hidden field which will contain selected record type id
try with this, It works (.......If It doesnt work for you paste entire HTML of your Web-To-Lead form in next post)
Thanks,
Bala
Thanks Bala -
We are still seeing "Other Lead" as the result. I have copied the code below for the Web Lead form. I took out alot of the states/countries to keep the length down. Everything else is the same as it is on the site:
Please let me know if you see anything we're doing wrong.
Garett,
Here is your updated Web-2-Lead form
update your code as per instruction , and then try it
Hope this will help you
Thanks,
Bala
if above solution didnt work for you,
go to WebtoLead setup
Check default owner of the lead,
GO to his profile and Check this record type is available for him
If recordtype is not available to this user , ENABLE It
and then try form
Hope this will be work
Thanks,
Bala
Any solution work for you mark as accepted :)
Thanks,
Bala
All lead record types we set up are enabled for this profile...I just checked. fyi
Did you try newlly updated WEB2LEAD code ?
If there is no any luck
mail me your WEB2Lead Page and LIST of all record type Name and their SFID
Thanks,
Bala
Check out the lead with Email address recorcType@recordtype.com (I have just submit the form with this email addres)
in your org, Llet me know its recordType
Thanks,
Bala
Hi Bala,
That worked! Thank you for your help.
However I am curious to know what changed so that the Lead Record Types come through now. Could you please let me know?
Garett,
It really nice that finally it works.
I just passed correct recordType value by using hidden field as follow
<input type=hidden name="recordType" value="01230000000mEvg">
and that did all job for us ....:)
Please accept the solution which work for you and Help to community :)
one more thing I was get shocked due to your retUrl :(
Thanks,
Bala
Thansk
I guess what I'm having trouble understanding is why that code didn't work when we had it in yesterday. Was anything changed on the SalesForce side? We have not changed our form code since trying that code and failing yesterday afternoon. Yet it works this morning...
If i accept the solution, are we able to continue this discussion? I'm just more curious than anything at this point.
Garett,
If you want to test the functionality, why its working
just remove following code from the form
<input type=hidden name="recordType" value="01230000000mEvg">
and see the result,
it will again rollback to your default record type
Thanks,
Bala
Hi Guys,
It's 2012 and I have the same issue here. Record Type is POSTed correctly by my form, but SF just writes the default value for RecordType. The user I use as owner for Web-To-Lead generated leads is the super admin and can choose record type when creating a new lead.
Have you managed to solve this??
Cheers,
Lucas