We currently only have a Form API doc section for Drupal 6.
http://drupal.org/node/204270
Not much has changed in FAPI for Drupal 7. My recommendation would be to change the header of the D6 version to say D6 and D7, and go through the pages, update their version taxonomy to include Drupal 7, and edit, noting any minor changes that may have occurred.
Related issue: #708304: Documentation for hook_element_info() still reports a link for http://drupal.org/node/169815
Comments
Comment #1
jhodgdonIssue I just marked as duplicate of this one:
#767368: write D7 version of the FormAPI guide
Comment #2
arianek commentedComment #3
rfayActually there are quite a lot of changes. We've been working on the FAPI doc as time went on, and I've written some blogs about the changes.
Comment #4
jhodgdontagging (this is the tag for developer-oriented doc issues in the docs project)
Comment #5
jhodgdonComment #6
aquariumtap commentedRelated: the link to the Form API Quickstart Guide on the D7 FAPI page is written for D6. Would be good to note that to avoid confusion.
Comment #7
phryk commentedThe documentation of hook_element_info() is partly wrong.
The callbacks set with #pre_render are only called with one argument, $element.
Also there is no info on when the callbacks defined in hook_element_info() are called, what they are good for and what they ought to return.
For instance: The callbacks in #process, #after_build, #pre_render and #post_render need to return $element for the element to be rendered at all. Also the callbacks in #submit (which would be about the most important, I'd say) don't seem to be called *at all*
Compared to the rest of the drupal documentation, the doc on creating custom form elements is a real eyesore.
Comment #8
jhodgdon#1145952: Drupal 7/8 Form quick start docs missing