input type is giving problem when MATRIX is selected "undefined" message