Is it possible for CCK number fields to optionally allow (a) Entering commas to separate thousands, eg. 2,250 (b) To display commas as thousand separators.

I note there is the Formatted number CCK module, but I've already put together a site with a standard CCK number type, integrated with templates and Views. It does seem odd that there is a completely separate formatted number type, rather than the ability to format the existing number type.

Comments

iantresman’s picture

It also seems odd that, on the CCK Display Fields page, I can choose a number formatter that will output numbers with commas as a thousands separator, but not let me input them.

tmsimont’s picture

also have this problem -- seems silly to me that commas are no good. i imagine the problem relates to this issue: http://drupal.org/node/143697

i guess it used to be ok to have commas, but rather than figure out if a comma is in the right place or not, they just nuked comma support... did you ever find a solution?

andywalters’s picture

As this is one of the first results on google for number formatting in Drupal, I'm putting a note here that in case anyone is wondering how to do this in D7, it is now in core. Just go to Structure->Content Types->(Your Content Type)->Manage Display.