API page: https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_che...
Hello,
In the comment, i think the parameter #title is no correct, #name is better no?
#id is missing and #value is useless.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | drupal-fix_theme_checkbox_comments-2031755-7.patch | 874 bytes | mpv |
| #4 | drupal-fix_theme_checkbox_comments-2031755-4.patch | 858 bytes | mpv |
Comments
Comment #1
jhodgdonIf a comment is wrong, you can reply to the comment and describe the problem. If it's completely misleading... well I'm moving this to the moderation issue queue just in case.
Comment #2
NerOcrO commentedIt's a misunderstanding :)
I was talking about comment of function !
#id is missing
#value is useless
#title => #name
Comment #3
jhodgdonHey, sorry, I was just going through some old issues and found this. Moving to Drupal Core because when there are issues in the documentation we need to fix it in Drupal Core.
Comment #4
mpv commentedHere's a patch with the suggested changes:
#id#value#titleto#nameComment #5
jhodgdonThanks! This looks correct to me according to the issue report.
However, I think the issue report is incorrect, because all form elements in Drupal use #title and #description, I think?
Comment #6
jhodgdonAlthough come to think of it, theme_checkbox() itself does not use #title or #description. What the function itself uses, if you look at the code, is:
#id
#name
#attributes
#checked
#return_value
So I think the patch needs a small update.
Comment #7
mpv commentedThat's right, I missed required and description. The only properties used are the ones you mentioned in #6. I think it's ok now.
Comment #8
jhodgdonThanks!
Comment #9
jhodgdonThanks again! Committed to 7.x.