Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
iantresman CreditAttribution: iantresman commentedIt 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.
Comment #2
tmsimont CreditAttribution: tmsimont commentedalso 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?
Comment #3
andywalters CreditAttribution: andywalters commentedAs 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.