switch ((int) $field_type), otherwise could cause strange results since input is a string