D8 version

#D8CX: I pledge that Range will have a full Drupal 8 release on the day that Drupal 8 is released.

Most parts of the D7 version has been ported. See issue queue for details.

To-Do (as of 25.02.2014):

#2204299: Provide configuration schema yaml file for views integartion
#2204301: Fix exposed filter for range within views filter
#2204303: Add feeds integration
#2204305: Fix default values for formatter settings checkboxes not being set
#2204309: Add field validation rules
#2204313: Introduce tests

D7 version

Important notice for D6 users

This module provides general range field that could be used in various situations.
This module doesn't provide a D6 functionality.

Overview

This module is inspired by core Number module and inherits it's features. It provides numeric range field.
Range field allows to save two numeric (integer, decimal or float) values (from and to), which represents some kind of range (for example: age range).

Features

Field types:

  • Integer range (range_integer)
  • Float range (range_float)
  • Decimal range (range_decimal)

Range field has the same instance settings as Number field:

  • Minimum and maximum values
  • Prefix and suffix (separate for the FROM and TO values)
  • Precision and scale [for decimal ranges]
  • Decimal separator [for decimal and float ranges]

Widgets:

  • Two textfields

Formatters:

  • Default
  • Unformatted

Module uses the same formatter options as core Number module and new option for range separator:

  • Range separator (- by default)
  • Combine equal values into a single one (FALSE by default).
  • Thousand separator ( by default)
  • Decimal separator [for decimal & float ranges] (. by default)
  • Scale [for decimal & float ranges] (2 be default)
  • Show FROM value prefix & suffix (TRUE be default)
  • Show TO value prefix & suffix (TRUE be default)

Third party modules support

  • Feeds
  • Views: filters view by value, which is in or out of the range

Sponsorship

This module is sponsored by Lemberg Solutions.

D6 version, originally created by robertgarrigos[DEPRECATED]

This module defines numeric fields within a range of possible values and displays them colored accordingly: red for out of range numbers and green for in range numbers. Also, the minimum and maximum range figures are also printed along the main value in view mode. An example of use of this module would be listing blood analysis values.

Most of the code containt in this module commes from the number.module containt in cck.
See http://drupal.org/node/303397 for why I created a new module instead of posting a patch.

Project Information

Downloads