function theme_options_none

7.x options.module theme_options_none($variables)

Returns HTML for the label for the empty value for options that are not required.

The default theme will display N/A for a radio list and '- None -' for a select.

Parameters

$variables: An associative array containing:

  • instance: An array representing the widget requesting the options.

Related topics

1 theme call to theme_options_none()
_options_get_options in drupal/modules/field/modules/options/options.module
Collects the options for a field.
2 string references to the theme hook from theme_options_none()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

options_theme in drupal/modules/field/modules/options/options.module
Implements hook_theme().
_options_get_options in drupal/modules/field/modules/options/options.module
Collects the options for a field.

File

drupal/modules/field/modules/options/options.module, line 409
Defines selection, check box and radio button widgets for text and numeric fields.

Code

function theme_options_none($variables) {
  $instance = $variables['instance'];
  $option = $variables['option'];

  $output = '';
  switch ($instance['widget']['type']) {
    case 'options_buttons':
      $output = t('N/A');
      break;

    case 'options_select':
      $output = ($option == 'option_none' ? t('- None -') : t('- Select a value -'));
      break;
  }

  return $output;
}