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.
When there no terms in the vocab and the widget set to "Check boxes/radio buttons" you'll see just the title of the vocab without any options. I'm attaching a patch for fix this one.
Comment | File | Size | Author |
---|---|---|---|
#4 | innerdiff-2243091-4.txt | 3.47 KB | RoySegall |
#4 | hide-field-when-empty-2243091-4.patch | 5.21 KB | RoySegall |
#3 | innerdiff-2243091-3.txt | 3.02 KB | RoySegall |
#3 | hide-field-when-empty-2243091-3.patch | 3.63 KB | RoySegall |
#2 | innerdiff-2243091-1.txt | 612 bytes | RoySegall |
Comments
Comment #1
amitaibuI don't think we should work with the form element, as we could determine if there are terms we got in the query.
Comment #2
RoySegall CreditAttribution: RoySegall commentedI didn't took care with field element which not holds the #options property. Attaching fix.
Comment #3
RoySegall CreditAttribution: RoySegall commentedI'm uploading the fix and a test a skeleton for the simple test. I'll continue work on this tomorrow.
Comment #4
RoySegall CreditAttribution: RoySegall commentedComment #5
amitaibuAs noted above, the count check should be against a query, not the form element.
Comment #6
amitaibuRe-assigned to myself.
Comment #7
amitaibuPatch looks good, just minor nitpicks.
We need to set #access to FALSE.
Comment #8
amitaibuActually, re-assigned to RoySegall, since very little left to do.