Input Box for Currency

Hi,

I was wondering; what is the common way of masking an input box for currency using the CAF?

Normally, in any other web platform I will use a JavaScript on the onKeyPress event of the input box and pass the event to check which key was press. That JavaScript function would return true only if a number is press and would also format the text.

I tried using the same JavaScript in the onKeyPress properties in the CAF but I was unable to capture the event.

Example the old way à



function currencyFormat(fld, e) {

}

For your control’s client side events you can find key press etc events and put your javascript code in there.
In addition to that you may try using validators. There are some build in validators. You can write your own as well.