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
Alex TMAlex TM 

Web to lead hidden values

I'm try to pre-populate some hidden fields on our web to Lead form, but am struggling with the standard field

The first two lines are from the template provided and work great, as does the custom Asset Class field.

But for some reason the two standard fields I have highlighted are not working. What am I doing wrong?!

User-added image
Best Answer chosen by Alex TM
Alex TMAlex TM
I figured out one

leadsource should be lead_source

trying to figure out what the other fields are called. Why doesn't it just match the API label?!

All Answers

Vijay NagarathinamVijay Nagarathinam
HI,

Refer the below site, you get some idea,

http://www.simplysfdc.com/2013/06/salesforce-setting-record-type-in-web.html
http://help.salesforce.com/HTViewSolution?id=000005177

Let me know if you need any help regarding this.

Thanks,
Vijay
Alex TMAlex TM
Tried this. Still not working!

<input type=hidden name="recordtypeid" id="recordtypeid" value="012w0000000kcGo">
<input type=hidden name="leadsource" id="leadsource" value="Web">
<input type=hidden name="status" id="status" value="Not contacted">
Alex TMAlex TM
I figured out one

leadsource should be lead_source

trying to figure out what the other fields are called. Why doesn't it just match the API label?!
This was selected as the best answer
James WooleyJames Wooley
recordtypeid should be recordType

Not sure why they don't match API name though sorry!
Alex TMAlex TM
And the record type wasn't working for two reasons.

Firstly the name should have been recordType

Secondly the behavior used when applying assignment rules to manually created records in hte Lead settings shold have been set to 'Keep existing recrd type'