How about using JavaScript to filter the input.
<input name="myInput" id="myInput" onkeypress="return allowOnlyNumber(event);">
function allowOnlyNumber(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
Note: In the allowOnlyNumber function, it serves my need, you need to modify it as it suit you.