This project is not covered by Drupal’s security advisory policy.

Overview

This module extends the functionality provided by five modules coming with Content Construction Kit (CCK) for Drupal 6.x:

  • Node Reference
  • Number
  • Option Widgets
  • Text
  • User Reference

and by the module Select (or other).

It acts when a CCK field of type

  • Decimal
  • Float
  • Integer
  • Node reference
  • Text
  • User Reference

with the widget

  • Select list
  • Select (or other) list

is added to a content type,

  • and the Number of values is kept to 1 (one).

Such a field is a single-value select list.

CCK would natively display such a single-value select list as follows:

  • If the field is required, the first selectable option is pre-selected. This would allow the end-user to successfully submit a form without actually selecting anything from a required select list, effectively making the "required" property obsolete.
  • If the field is not required (optional), a non-value option "- None -" will be added on top.

CCK Single Select (this module) changes the first (default) option of each single-value select list as follows:

  • If the field is required, a non-submittable customizable option will be added on top (defaults to "- Please select an option -"). This forces the end-user to actively select one of the provided options in order to successfully submit the form.
  • If the field is not required, the non-value option on top will be made customizable (defaults to "- No selection -").

Details

CCK natively only adds a non-value option (per default "- None -") on top of a single-value select list, if the field is optional. "CCK Single Select" expands that functionality to required single-value select lists.

The texts of the non-value first option for both required and optional fields are customizable and translatable via an overridable PHP template file.

Installation and Versions

This module follows Drupal's standard module installation procedure.

CCK Single Select 6.x-2.x is the successor of CCK Required Single Select 6.x-1.x, which is no longer supported.

When upgrading from version 6.x-1.x, make sure both the "CCK Required Single Select" and "CCK Required Reference Select" modules are disabled. Then remove the old module directory "cck_required_single_select" before installing "CCK Single Select" version 6.x-2.x. Finally, run Drupal's database update utility ("update.php").

Drupal 6 EOL

Since Drupal 6 has reached its official End of Life (EOL) on 24 February 2016, this module has been unsupported since that day as well.

Drupal 7

The Field module of Drupal 7 core, with its Text, Number, List and Options sub modules, no longer has the problem CCK for Drupal 6 had with required, single-value select lists. A non-submittable option, defaulting to "- Select a value -" is displayed and pre-selected on top. Thus, this module is obsolete for Drupal 7.x and higher.

Project information

Releases