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
jolly_jonesyjolly_jonesy 

Custom field Name and ID NOT W3 Web compliant - Serious JavaScript Validation Issues

Hi

 

We have a custom field in Sales Force which is called  'Region'.

 

I have a simple web-to-lead form on our website that uses ringlead to pass the lead to Sales Force.

 

The Custom ID and Name that Sales Force gave us for inclusion on this form (to be attached to the 'region' field) is:

 

0N30000000mnNj

 

WHICH IS NOT WEB COMPLIENT - name an id should not begin with a digit, should begin only with a letter. please see W3 's website:

 

http://www.w3.org/TR/html401/types.html#type-id

 

This is a serious problem as I am unable to write ANY JavaScript validation for this field and subsequently data is lost and leads are not being distributed correctly which is harming our business. Why could sales force not spot this and is there a way to customise this custom field name and id so that at least it starts with a letter???

 

Has anyone come against this issue and found a work-around in JavaScript validation???

 

Thanks

 

Steve Jones

Chris_627Chris_627
Found this in SF's Help & Training - hope it helps.

Solution: How do I reference a custom field with Javascript?

You can reference a custom field with javascript by using:

"document.formname.elements['custom-field-id'].value"
instead of
"document.formname.custom-field-id.value"