Needs review
Project:
Views Bulk Operations (VBO)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Mar 2012 at 13:13 UTC
Updated:
21 Sep 2023 at 22:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bojanz commentedI'm not actually doing anything special here:
So the question is: why does it fail...
Comment #2
liquidcms commentedi think somewhat related. i have a grid layout and i get a select all on this page checkbox and a select all on all pages checkbox with an OR between them.
to start with, the view is not set to use paging; so silly to have both checkboxes as they are now technically the same thing; but regardless of that, if there was some wort of id or class assigned to a wrapper around the checkboxes, labels and even the OR, it would be possible in css to hide these.
i looked at a form_alter but not available at that time to alter; looking next at after_submit function; failing that i guess only solution is use JS or to write a patch to add some way that css can simply hide these.
Comment #3
texas-bronius commentedIt's a good question, if the above code is producing the Select All (Pages) checkboxes. However, the derivative markup that is on the VBO form I am dealing with appears to a) be from a FAPI #markup element and b) not show when Javascript is disabled. Here's the dpm/kpr out of $form in a

hook_views_bulk_operations_form_alter:Something else is going on.
Comment #4
texas-bronius commentedBut in the meantime, from the desk drawers labeled "Don't work around it like this," you can work around like this:
Rough and tumble, toil and bumble..
Comment #5
madhaze commentedIt seems like all form items should have an id and checkboxes should have a with the for="xxx" (xxx being the inputs id) Due to VBO not using this standard format i'm having issues styling forms to look consistent. I might look to do what is mentioned above as a work around. That or find a js option possibly
Comment #6
j1mb0b commentedActually, the form is not being built correctly it should calling drupal_get_form before drupal_render since it's within that function the call is made eventually to:
https://api.drupal.org/api/drupal/includes%21form.inc/function/form_buil... - which is responsible for settings the #id property on the element.
Therefore, the form build could be set outside the theme function as a standalone form function, which allows you to call drupal_render.
Comment #7
crutch commentedThere is no way that I can find to make a label effect the checkbox for a views-row.
Comment #8
alex.bukach commentedWhy cannot it be as easy as this one?
Comment #9
alex.bukach commentedCorrected paths in the patch.
Comment #10
dmundra@alex-bukach I believe you addition does work but no label is automatically added to the checkbox. I am actually solving a different problem which is that the lack of the label is an accessibility issue. So I think we should combine your solution with
Comment #11
dmundraI created a related issue https://www.drupal.org/project/views_bulk_operations/issues/3388986 that tackles the missing labels. Maybe that should include the unique ID solution from here?