I needed a new feature on this number.module for a project of mine which took me to write a new module because I though it would be better. Finally it has been easier than I thought so it may be added to the number.module as a new optional feature. However, before posting this as a patch I would like to know whether this will be in the scope of this module or not.
With this new feature, which as I said would be optional, a number field could be set as within a range and be shown in a different color depending whether it is within the range or out of it. So in the range would be in green and red for an out of range number. This is a different use of the min and max fields already in the settings, as these set a minimum and a maximum value allowed to enter. The minimum and maximum range settings would allow to enter an out of range number. Besides that, the min and max range values are printed also next to the value in view mode.
This feature arose from the need to list blood analysis values.
So, would you like to see this on this module, as an extra option, or should I create a new drupal project for it?
Comments
Comment #1
yched commentedMy first impression is that this is a little specific for inclusion in CCK's number.field
OTOH, creating a new field module for this looks overkill...
Isn't this primarily a theming issue ? Something that would be more like a snippet of code somewhere in the handbook than in an actual module ?
Comment #2
robertgarrigos commentedNot really, as this new feature needs two new fields to set the range. The actual min and max fields have a different use (limiting the entry) so it needs to have some logic in the module itself.
Comment #3
moshe weitzman commentedAnother use case for formatter settings ... Sounds like a contrib module to me.
Comment #4
yched commented@moshe - you're right about formatter settings, of course :-(
I'd tend to won't fix as far as CCK is concerned - Karen, feel free to reopen if you think different.
Comment #5
karens commentedI agree, this is nice but definitely too specialized for CCK core.
BTW, for more fun with colors in CCK, take a look at #284337: Updated Colorpicker CCK module :)
Comment #6
robertgarrigos commentedThanks for your opinions. I created a new cck contrib module for this: http://drupal.org/project/range