We have some forms that only collect email address. All leads are automatically pushed to SFDC and since Last Name/Company are required, they are automatically set to "NEEDS INFO". When a lead fills in the next form, they are now seeing the ugly "NEEDS INFO" in the pre-populated fields.
I do not want to turn off pre-population becasue in most cases the values are correct. However, I would like to be able to clear the field if it contains "NEEDS INFO".
I tried this Javascript but it isn't working. Any ideas why or how I can do this? Thanks so much for your help!
<script type="text/javascript" src="/js/public/jquery-latest.min.js"></script>
<script type="text/javascript">
// set no conflict mode for jquery
var $jQ = jQuery.noConflict();
$jQ(document).ready(function(){
var CompanyField = $jQ("#Company");
var LastNameField = $jQ("#LastName");
if (CompanyField == "NEEDS INFO")
{
$jQ('#Company').attr('value','')
}
if (LastNameField == "NEEDS INFO")
{
$jQ('#LastName').attr('value','')
}
});
</script>