Add help text to checkbox options on node form
I tried to do this first by overriding checkboxes theme hook theme_checkboxes($var) with preprocess hook template_preprocess_checkboxes($var) but there was not any option to set #suffix property to individual checkbox, Then i figured out that theme_checkboxes theme hook call the theme_checkbox hook for individual checkbox then i tried to override theme_checkbox($var) with template_preprocess_checkbox($var) but that also didn't worked, I was able to set #suffix and #field_suffix property on individual checkbox but that was not rendering because individual checkbox's #processed property was already set to True, I tried by setting that false but no success :(

I tried by setting pre_render callback and process callback but too didn't worked, May be i was making some mistake.

This is preprocess hook for checkboxes theme hook:

function template_preprocess_checkboxes($variables) {
  $variables['element']['element_name']['#printed'] = FALSE;
  $variables['element']['element_name']['#processed'] = FALSE;
  $variables['element']['element_name']['#suffix'] = 'This is help text';
  $variables['element']['element_name']['#pre_render'][] = 'mymodule_checkbox';

  $element = $variables['element'];
  $attributes = array();
  if (isset($element['#id'])) {
    $attributes['id'] = $element['#id'];
  }
  $attributes['class'][] = 'form-checkboxes';
  if (!empty($element['#attributes']['class'])) {
    $attributes['class'] = array_merge($attributes['class'], $element['#attributes']['class']);
  }
  if (isset($element['#attributes']['title'])) {
    $attributes['title'] = $element['#attributes']['title'];
  }
  return '&lt;div' . drupal_attributes($attributes) . '&gt;' . (!empty($element['#children']) ? $element['#children'] : '') . '&lt;/div&gt;';
}

function mymodule_checkbox($var){
  $var['element']['#suffix'] = 'this is help text added by pre render callback';
}


Then i tried the same with template_preprocess_checkbox($var)

function template_preprocess_checkbox($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'checkbox';

  element_set_attributes($element, array('id', 'name', '#return_value' =&gt; 'value'));

  if ($variables['element']['#parents'][0] == 'parent_field_name') {
    $variables['element']['#attributes']['#processed'] = FALSE;
    $variables['element']['#attributes']['#field_suffix'] = t('This is simple help text');
    $variables['element']['#suffix'] = 'another suffix';        
  }

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

  return '&lt;input' . drupal_attributes($element['#attributes']) . ' /&gt;';
}


Can someone help me too on this?