function theme_checkbox

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 form.inc theme_checkbox($variables)
cle7 form.inc theme_checkbox($variables)
elmsmedia7 form.inc theme_checkbox($variables)
icor7 form.inc theme_checkbox($variables)
meedjum_blog7 form.inc theme_checkbox($variables)
mooc7 form.inc theme_checkbox($variables)

Returns HTML for a checkbox form element.

Parameters

$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #title, #value, #return_value, #description, #required, #attributes, #checked.

Related topics

496 string references to the theme hook from theme_checkbox()

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.

accessibility_content_admin_form in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.admin.inc
accessibility_content_form_field_ui_field_edit_form_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module
Implements hook_form_FORM_ID_alter().
accessibility_reporting_form_field_ui_field_edit_form_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_reporting/accessibility_reporting.module
Implements hook_form_FORM_ID_alter().
accessibility_test_add_form in sites/all/modules/ulmus/accessibility/accessibility.module
Form for saving accessibiliy test entities.
accessibility_test_edit_form in sites/all/modules/ulmus/accessibility/accessibility.module
Edit form for accessibility tests.

... See full list

File

includes/form.inc, line 3109
Functions for form and batch generation and processing.

Code

function theme_checkbox($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'checkbox';
  element_set_attributes($element, array('id', 'name','#return_value' => 'value'));

  // Unchecked checkbox has #value of integer 0.
  if (!empty($element['#checked'])) {
    $element['#attributes']['checked'] = 'checked';
  }
  _form_set_class($element, array('form-checkbox'));

  return '<input' . drupal_attributes($element['#attributes']) . ' />';
}