Steps to reproduce:
- create boolean field on a node content type
- enter some 'help text' (description)
- use 'single on/off checkbox' as the widget

Expected:
- checkbox & help text display on the node edit page

Actual:
- help text displays, but the checkbox is nowhere to be found; not present in markup, so it's not a CSS issue; disabling JS does not help

Some checkboxes on edit-node pages do not get displayed.

Files: 
CommentFileSizeAuthor
#16 1649392-bootstrap-checkbox_radio_title_fix-16.patch929 bytesMark Carver
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]
#11 bootstrap-single-value-checkboxes-1649392-11.patch871 bytesMark Carver
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]
#3 1649392-checkbox_not_rendered-3.patch538 bytesyuriy.babenko
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1649392-checkbox_not_rendered-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#2 1649392-checkbox_not_rendered-2.txt538 bytesyuriy.babenko
#1 1649392-checkbox_not_rendered-1.patch539 bytesyuriy.babenko
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1649392-checkbox_not_rendered-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new539 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1649392-checkbox_not_rendered-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Bug is in twitter_bootstrap_form_element(). Patch attached. (Disclaimer: minimal testing done.)

StatusFileSize
new538 bytes

Made a typo in the patch above. Corrected version attached.

StatusFileSize
new538 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1649392-checkbox_not_rendered-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

... and here's one with the proper file extension!

Status:Needs review» Needs work

This patch breaks the display for multi value checkboxes.

Priority:Critical» Major

I just tried to replicate this issue... but so far when I follow the steps, I do see a checkbox.

Have I missed something?

Project:Twitter's Bootstrap» Bootstrap Framework

Project:Bootstrap Framework» Twitter's Bootstrap

Moving back to the original project

Project:Twitter's Bootstrap» Bootstrap

I was able to reproduce this via #1947214: Problems on revision tab. @wundo can you please explain #4? I don't see how this breaks, maybe it doesn't since the form stuff seems to have been refactored since this issue was opened. Applying #3 outputs the same structure of markup for both checkboxes and radios. Looks good to me:

<div class="control-group form-type-radios form-item-status form-item">
  <label class="control-label" for="edit-status">Status </label>
  <div class="controls">
    <div class="form-radios" id="edit-status">
      <div class="form-type-radio form-item-status form-item">
        <input type="radio" class="form-radio" value="0" name="status" id="edit-status-0" style="">
        <label for="edit-status-0" class="option radio">Blocked </label>
      </div>
      <div class="form-type-radio form-item-status form-item">
        <input type="radio" class="form-radio" checked="checked" value="1" name="status" id="edit-status-1">
        <label for="edit-status-1" class="option radio">Active </label>
      </div>
    </div>
  </div>
</div>

Status:Needs work» Needs review
StatusFileSize
new871 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Re-rolled patched against latest dev

Assigned:Unassigned» wundo

@wundo please review.

I'm unable to reproduce it on my local environment, #description works perfect to me

Status:Needs review» Postponed (maintainer needs more info)

Guys, I can't reproduce this on my local using the following checkbox:

$form['checkbox'] = array(
    '#type' => 'checkbox',
    '#title' => t('Checkbox'),
    '#description' => 'Description',
    '#title_display' => 'after',
  );

Could you clarify how to reproduce this using plain FAPI elements?

Assigned:wundo» Mark Carver

Title:Single-value checkboxes not rendered properlyCheckbox or radio inputs without titles don't render
Assigned:Mark Carver» wundo
Status:Postponed (maintainer needs more info)» Needs review
StatusFileSize
new929 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Ok, I was able to reproduce the original issue, which is the same issue that was happening in #1947214: Problems on revision tab.

Steps to reproduce:
- create boolean field on a node content type
- enter some 'help text' (description)
- use 'single on/off checkbox' as the widget

It has to do with the fact the the "On value" title is empty (ie: boolean). There is a checkbox on the field configuration page underneath the help text, that if checked, will allow the checkbox to be shown then:

Use field label instead of the "On value" as label

I actually agree with @wundo in #4 though now. The element output needs to be in $variables['#children'] not the standard $output like the others. The issue really lies in how the label is processed.

i can confirm patch in #16 fixes the issue for me.

The easiest way to reproduce this bug is to:

  1. set the theme to bartik
  2. install and enable the diff module
  3. create an article or basic page that contains revisions
  4. view the 'compare revisions' tab -- note the radio buttons
  5. switch to bootstrap and view the 'compare revisions' tab again - note the missing radios
  6. apply the patch
  7. view the 'compare revisions' tab again -- note the reappearance of the radio buttons

So far I don't see any other ill effects-- will continue to test with the patch applied.

Assigned:wundo» Unassigned
Status:Needs review» Reviewed & tested by the community

I'm marking this rtbc then.

Version:7.x-2.x-dev» 7.x-3.x-dev
Status:Reviewed & tested by the community» Fixed

Thanks!

7.x-2.x - Committed cb42e88
7.x-3.x - Committed 10ad334

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Version:7.x-3.x-dev» 7.x-3.0-beta1