I'm not sure if the key names are case-sensitive (I expect they are), but the identifiers for custom fields change from org to org. If you have Lead.My_field__c in a sandbox, it will have a different id in production. The only fields that are mandatory are:
- Lead.LastName
- Lead.Status (update: this may be set automatically by SF)
- Any custom field you mark as required in the definition
- An HTML hidden input for oid, which is your org's id
In addition, there are form fields you can add that put your form into debug mode. The following was taken from UI's Web2Lead generation tool:
<!-- ---------------------------------------------------------------------- -->
<!-- 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="[email protected]"> -->
<!-- ---------------------------------------------------------------------- -->
Enabling debug mode will do the following:
- Not submit the Lead to your org
- Display all form elements in your browser
In my experience, however, we receive an email whenever Salesforce cannot generate the Lead from the form's data. If you do not receive these emails you might be sending the form to the wrong org or have something mis-configured.