In the Form API documentation for the 'item' element (http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#item), a link is provided as a usage example. However, this link points to contact.module, whereas the function where the 'item' element is used now resides in contact.pages.inc.

I recommend changing the 'usage example' link (found at the above URL) from http://api.drupal.org/api/drupal/modules!contact!contact.module/7 to http://api.drupal.org/api/drupal/modules!contact!contact.pages.inc/7.

CommentFileSizeAuthor
#2 update_item_usage_example_link-1865248-2.patch807 bytesAnonymous (not verified)

Comments

jhodgdon’s picture

Project: Drupal core » Documentation
Version: 7.x-dev »
Component: documentation » API documentation files
Issue tags: +FAPI reference

Thanks! The form API reference is actually in the Documentation git repository, so moving to that project. Patches welcome. :)

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new807 bytes

Ah, thanks for pointing that out. I was originally going to post to the Documentation issue queue, but then saw this message on its project page:

For API (api.drupal.org) documentation, create an issue in the Drupal project issue queue and use the documentation component.

Might want to update that with a note about the Form API...

Here's a patch against the 7.x-1.x branch, however I'm a bit confused as the link I changed from doesn't match the link on api.drupal.org. Not sure how that works...

If this does indeed apply correctly, it may need to be ported up or down as appropriate.

jhodgdon’s picture

Regarding where to file the issue, thanks for pointing that out! I've fixed the project page.

Regarding this file not matching what's on api.drupal.org... not sure what to tell you. Sometimes api.drupal.org gets out of date, but I don't think many changes have been made recently, so I'm not sure what's going on.

jhodgdon’s picture

Status: Needs review » Needs work

Sorry, this fell off my radar here... We need a slightly different fix for 8.x first, then 7.x.

quietone’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Thanks for working to improve Drupal.

This is for the Drupal 7 Form API reference. Since Drupal 7 is past end-of-life this is now a "won't fix".

Work on documentation for form elements for supported versions of Drupal is at #2486967: [meta] Move/Create Form Element Documentation and #3313535: [Meta] Improve documentation for Render and Form Elements.