3.2.0

Formating input text field

Is it possible to format an input field to accept phone or zipcode formats, ie: ###-###-#### or #####-####.

Thanks

Ira
Ira Berkowitz
February 6,
It is possible to monitor changes and modify cell contents with onCellTextChanging() event. Here is an example which only allows numeric characters -

obj.onCellTextChanging = function(text, column, row){

    if (column == 1) { // column-1 only
        if (text.match(/[^0-9.+-]/)){
            return "error"; // prevent non-digits
        }
    }
}

Something similar could work for phone/zipcodes(?)
Alex (ActiveWidgets)
February 7,

This topic is archived.

See also:


Back to support forum