-
1. Re: Show/Hide Form Fields
GKaiseril May 22, 2013 8:47 AM (in response to lmphil)The us of the currency symbol does not allow the suppression of the zero display with a null string. So you can either set the fields not use the currency symbol or dynamically change the field format with JavaScript.
For the validation script use the following code:
// custom validation code;
var cCurrency = ""; // clear currency symbol;
if(event.value != 0) {
event.value = event.value;
// set currency symbol to USD
cCurrency = "$";
} else {
// zero value set field value to the null
event.value = "";
}
// set field format with/without currency symbol;
AFNumber_Format(2, 0, 0, "", cCurrency, true);
// end custom validation code;
The number of decimal places is assumed to be 2.
The form will need to be cleared or a calculation performed so the calculated fields will be updated and the validation script will run before one will see the results of this change.
-
2. Re: Show/Hide Form Fields
lmphil May 23, 2013 8:10 AM (in response to GKaiseril)Thanks! Does that also work in the case of a "%"?
-


