+ Start a Discussion
Stacy SennottStacy Sennott 

Web-To-Lead Form with Hidden Fields and Default Values not working

Hi,

I have included the following code in my Web-To-Lead form but it does not seem to be working to input the correct default values I have specified
<input type=hidden name="lead_source" value="Web"> 
<input type=hidden name="company" value="Onassis Foundation (USA)">
<input type=hidden name="00N37000004HPYD" value=true>

The last line refers to a check box with the id code refernenced to return a TRUE value upon Submission of Form.

Here is the link to the test form, which shows these fields to be hidden just above the code for the first visible info in the form.  But when I check in my Salesforce database, the default values are not specified upon Submitting: 
http://www.onassisusa.org/onassis-form-test2.html
Your help is appreciated!
Best Answer chosen by Stacy Sennott
William TranWilliam Tran
Look at your code:

You have special quotes for the hidden (you must have cut and paste from somewhere), make sure it's the regular standard double quotes.

Thx
 
<input type=hidden id=“lead_source" name=“lead_source" value="Web">

<input type=hidden id=“company" name=“company" value="Onassis Foundation (USA)">

<input type=hidden id="00N37000004HPYD" name="00N37000004HPYD" value=“1”> 


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

Also, if that still does not work,  you can always unhide them to see if that work then hide them once you get them working.

Thx

All Answers

William TranWilliam Tran
First, try adding the id in addition to name. 

Second the name/id  needs to be exact, for example:
 
<input type="hidden" id="lead_source" name="lead_source" value="web" />

your form has this: <input type=hidden name="LeadSource" value="Web"> -- WRONG

Thx
 
Stacy SennottStacy Sennott
Yes, I am having the programmer fix that. But the other code for Company and the hidden Checkbox field are also not updating to the default specified. Thoughts?
William TranWilliam Tran
Just try adding the id field also. 

If you still have issues, then check to ensure the name is accurate.

Thx
William TranWilliam Tran
Stacy,

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks
Stacy SennottStacy Sennott
I tried adding the id field and still not getting results.  Here is my code for the three items I would like to have hidden and have a default value specificed...I am wondering if I should take the NAME info out completely from the code:

 <input type=hidden id=“lead_source" name=“lead_source" value="Web">

<input type=hidden id=“company" name=“company" value="Onassis Foundation (USA)">

<input type=hidden id="00N37000004HPYD" name="00N37000004HPYD" value=“1”> 
 
William TranWilliam Tran
Look at your code:

You have special quotes for the hidden (you must have cut and paste from somewhere), make sure it's the regular standard double quotes.

Thx
 
<input type=hidden id=“lead_source" name=“lead_source" value="Web">

<input type=hidden id=“company" name=“company" value="Onassis Foundation (USA)">

<input type=hidden id="00N37000004HPYD" name="00N37000004HPYD" value=“1”> 


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

Also, if that still does not work,  you can always unhide them to see if that work then hide them once you get them working.

Thx
This was selected as the best answer
Stacy SennottStacy Sennott
Thank you!
William TranWilliam Tran
Stacy, if your question is answered, be sure to choose best answers.

Thx