Here's the deal. We have a form that when the company name is entered, other information such as address, city, state, zip code, DUNS number, etc is populated by Dunn and Bradstreet. So we have a bit of code from them that reaches out to their database, based on the company name they populate that information. All well and good.
However, some of the values that they return are not "NetSuite Happy". For instance, we want to know the likelyhood of a company defaulting on a payment. DnB would provide us with a risk score of L, M, H (Low, Medium, High) and this would auto populate our custom field of Risk Score.
Now when I add Risk Score as a field on our online customer form, how do I look at the value DnB is providing (through the auto population that they have) and change it? I've attempted the code below, but this is not working. (code exists in the head tag)
Any ideas?
<script type="text/javascript"> function subForm() { var riskScore = document.getElementById.('comments'); if (riskScore.value == 'L') { riskScore.value = 'Low'; //UPDATED } return true; } </script>I have the <form method='post' onSubmit='return subForm()'>
to validate my code, but it doesn't seem to be happening. Whenever I submit the form, the value for the 'comments' field is always 'L'. So for some reason I'm not able to test the value of the 'comments' field and change the value.Help?? Thanks!-Kurt