For checkbox and radio form elements, when #title_display is set to 'after' (default), input is placed after its label, not inside.
In form-element.func.php, must swap lines 116 and 119:
case 'after':
if ($is_radio || $is_checkbox) {
$output .= ' ' . $prefix . $element['#children'] . $suffix;
}
else {
$variables['#children'] = ' ' . $prefix . $element['#children'] . $suffix;
}
$output .= ' ' . theme('form_element_label', $variables) . "\n";
break;
Must be:
case 'after':
if ($is_radio || $is_checkbox) {
$variables['#children'] = ' ' . $prefix . $element['#children'] . $suffix;
}
else {
$output .= ' ' . $prefix . $element['#children'] . $suffix;
}
$output .= ' ' . theme('form_element_label', $variables) . "\n";
break;
Comments
Comment #1
mrded commentedThere is the patch
Comment #3
mrded commentedMove space between input and text.
Comment #4
mrded commentedComment #5
hkirsman commentedThank you very much. Works in 7.x-3.0
Comment #6
markhalliwellComment #8
mrded commentedThanks!
Comment #10
Tectron commentedIt works, thank you very much. Coming from https://www.drupal.org/node/2651042