In some cases the use of checkboxes is obvious and do not need an additional label. This is especially true when it is used in a table, using the matrix component, where the row labels and the column labels make it clear what the checkbox is enabling.

It would be useful if this could be controlled, similarly to the multiplicity.

Comments

snufkin created an issue. See original summary.

snufkin’s picture

Status: Active » Needs review
StatusFileSize
new2.55 KB

And here is a patch for it. It exposes a setting per column and then enforces the #after_title attribute for each of the cells based on the column configuration.

snufkin’s picture

StatusFileSize
new2.65 KB

Updating the patch to use a different attribute as there is actually a standalone setting for column titles.

devd’s picture

Hi snufkin,
Please create a new patch for dev version.

snufkin’s picture

StatusFileSize
new2.92 KB

Rerolled

devd’s picture

Hi snufkin,

The ported patch is not working, Can you explain by screens. Which functionality you want to achieve.?

snufkin’s picture

StatusFileSize
new2.99 KB

I would like to hide the form labels for checkboxes (I don't think it is useful for radios).

In some cases, especially with the matrix component the options you expose are self-explanatory, e.g. the following table: https://www.evernote.com/l/AIjJjPlIMsRCNY6n_Kb0bRwB2kbNphGPWqo does not need the "yes" label next to each of the checkboxes, it just makes the table crowded. I would like to have an option to remove it.

The patch does this by exposing a form on the component configuration for each of the rows (perhaps it would be nicer if we were using #states, to only show when the radio option is used, but we can talk about it once the core functionality is accepted and works fine).

After patching there is an option to hide the label: https://www.evernote.com/l/AIiz2bNt6rVIJIXZA8puhqtuoOa_nZHCoIs
Which then renders like this: https://www.evernote.com/l/AIjDryuDSY5CaaG5uVmS5qVag1Vtk5BcdZM

Also the patch is rerolled, it was not respecting defaults correctly and used the column #title_display attribute incorrectly (not to mention the two whitespace errors).

chetan-singhal’s picture

Category: Task » Feature request
Status: Needs review » Needs work
richgerdes’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new3.51 KB

Patch was outdated. Re-rolled patch for latest 7.x-4.x development version.

It had one bug, causing the configuration checkbox to be visible for select list fields which i fixed using the state api. Otherwise function works as expected.

  • chetan-singhal committed 1267ed2 on 7.x-4.x
    Issue #2568071 by snufkin, richgerdes: Allow hiding the checkbox label
    
chetan-singhal’s picture

Status: Reviewed & tested by the community » Fixed
chetan-singhal’s picture

Status: Fixed » Closed (fixed)