Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2006 at 18:07 UTC
Updated:
23 Oct 2006 at 20:01 UTC
Jump to comment: Most recent file
There is no mention of the 'item' type in the forms api documentation:
http://api.drupal.org/api/4.7/file/developer/topics/forms_api_reference....
It's missing from the HEAD docs too.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | item.patch | 8.88 KB | RobRoy |
Comments
Comment #1
RobRoy commentedI just noticed '#type' => 'item' is used in the forward.module. AFAIK there is no 'item' FAPI type. Since it doesn't exist, the default type 'markup' is used.
Comment #2
jax commentedIt's also used in the image_attach module and a lot of core modules:
Since it is used in so many places I think the docs should at least mention something about it...
Comment #3
jax commentedEven if it's just something like: "Since it doesn't exist, the default type 'markup' is used."
I saw it in the code, wanted to know what it does, checked the docs, found nothing. So just the sentence above would already be helpful.
And I would like to know which attributes it supports, because I'm under the impression that it doesn't take #attributes.
Comment #4
RobRoy commentedI think one of the higher ups should comment here. We should either document it like Jax is saying OR submit patches to change those '#type' => 'item's to markups (we could remove the lines altogether but I think it is better to be explicit for learning's sake). I'd prefer the latter since it would avoid confusion in the future and there's no need to lead people to believe that we have duplicate types.
Comment #5
chx commentedItem is a form element and rendered as many other form elements, with an enclosing div, a possible title (w/ label) and possible description. All these are missing from markup.
Comment #6
RobRoy commentedI stand corrected...and lazy since with a bit of looking I could have actually researched that. My bad. Good call Jax and chx. :P
Comment #7
RobRoy commentedI thought I had write access to DOCs repo. Can someone grant me those? Here's the patch I was going to commit to DRUPAL-4-7.
Comment #8
RobRoy commentedNM, I was logged in as anonymous. Fixed in DRUPAL-4-7.
Comment #9
jax commentedI don't want to be a pain, but please don't forget HEAD. Else I'll run into the same problem in a couple of months...
Comment #10
RobRoy commentedFixed in HEAD. Someone should take a look and see if anything needs changing but at least the info is there now. Thanks Jax!
Comment #11
(not verified) commented