Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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;
Comment | File | Size | Author |
---|---|---|---|
#3 | bootstrap-2292899-3.patch | 1.08 KB | mrded |
Comments
Comment #1
mrded CreditAttribution: mrded commentedThere is the patch
Comment #3
mrded CreditAttribution: mrded commentedMove space between input and text.
Comment #4
mrded CreditAttribution: mrded commentedComment #5
hkirsman CreditAttribution: hkirsman commentedThank you very much. Works in 7.x-3.0
Comment #6
markhalliwellComment #8
mrded CreditAttribution: mrded commentedThanks!
Comment #10
Tectron CreditAttribution: Tectron commentedIt works, thank you very much. Coming from https://www.drupal.org/node/2651042