Regular checkboxes and radio buttons work fine, but when they are inside of a tableselect element they do not render properly.
I traced the issue down to an extra div being wrapped around the radio/checkbox element. To fix the problem either the label wrapper has to have content aside from the input:
<label for="xyz"><input type="radio" id="xyz" name="xyz"></label>
would need to be
<label for="xyz"><input type="radio" id="xyz" name="xyz"> XYZ</label>

But this messes up the view of the table select. Removing the extra div tag should work though.
Instead of this:

<div>
  <td>
    <label for="example-radio-button"> <input type="radio" id="example-radio-button name="example-radio-button" value="example_radio" class="form-radio"></label> 
  </td>
</div>

It should output this:

<td>
 <label for="example-radio-button"> <input type="radio" id="example-radio-button name="example-radio-button" value="example_radio" class="form-radio"> </label>
</td>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

el7cosmos’s picture

Status: Active » Closed (duplicate)
el7cosmos’s picture

Assigned: Unassigned » el7cosmos
Status: Closed (duplicate) » Needs review
FileSize
606 bytes

Sorry, i think this is separate issue

el7cosmos’s picture

el7cosmos’s picture

@skriptble i don't have problem with label or extra div, i don't know if this same issue or not. The patch will work for checkbox or radio that become very small inside table

skriptble’s picture

Status: Needs review » Reviewed & tested by the community

This works perfect for me!

Thanks!

markhalliwell’s picture

Assigned: el7cosmos » Unassigned
Priority: Major » Normal
Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Thanks @el7cosmos!

Committed 468865d to 7.x-3.x:

Issue #2118587 by el7cosmos, skriptble: Tableselect checkbox and radio buttons do not function properly.

Status: Fixed » Closed (fixed)

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