How to add fields with number values I need to add some fields than can take numeric values and enable Drupal to calculate it. I chose an integer field, tried to do some simple math, but Drupal 7 treats values of integer field as text. Moreover, integer field type widget can be only set up as text. Can anybody help me, and tell me how to add field with number values?
The reason why the widget for an Integer field is a text field is that the form element used from a browser is a text field. This means the browser is always returning text for an integer field.

This should not be a problem, since:


When you add an Integer field to an entity, the field value is validated to be an integer; an input containing characters that are not digits (e.g. 2A, Q3, 2.0) is not accepted, and the users get an error message requiring them to enter only numbers for that field.
PHP generally accepts a string containing only digits instead of an integer without to report errors. If you execute the following code, you would get 15 as result. (It requires the Devel module.)

$a = "3";
$b = "6";
$c = "2";

dpm($a + $b * $c);


You would get the same result if $a is set to "3A".