Skip to main content
Nintex Community Menu Bar

Using custom javascript to validate a Currency field not working.

  • May 2, 2017
  • 1 reply
  • 16 views

Forum|alt.badge.img+5

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);
     }
 };

1 reply

Forum|alt.badge.img+5
  • Author
  • May 3, 2017

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