Skip to main content

Working with Forms 2010, v1.2.10.  Using custom javascript to validate a Currency field.  The field is a drop-down list with multiple values, the default being '-select-'.  However the code shown below allows the form to be submitted with the default entry (-select-).  I could swear it was working last week.  Any ideas?

Here is the custom javascript from the item form:

//Validation for Currency drop down field
 function validateCurrency(source, arguments) {
     var selectedCurrency = NWF$("#" + wfCurrency + ' option:selected');
     var selectedCurrencyValue = selectedCurrency.text();
     var sourceText = arguments.Value;
     alert('selectedCurrencyValue =  ' + selectedCurrencyValue);
     arguments.IsValid = true;
     if (selectedCurrencyValue == '-select-') {
         arguments.IsValid = false;
         alert('arguments.IsValid = ' + arguments.IsValid);
     }
 };

The cause was other non-related script that caused the Currency validation to fail.


Reply