[documentation] [bug] Error in Forms API Quick Start Guide

fgm drupal-docs at drupal.org
Sun Mar 19 22:01:27 UTC 2006


Issue status update for 
http://drupal.org/node/54835
Post a follow up: 
http://drupal.org/project/comments/add/54835

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  fgm
 Updated by:   fgm
 Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/forms_api.html.patch (1.89 KB)

The first example in the Forms API Quick Start Guide at
http://drupaldocs.org/api/head/file/contributions/docs/developer/topics/forms_api.html


includes this line: #default_value' => $edit['foo'],


but according to chx, it is better practice to use #default_value' =>
'foo', instead. The suggested patch fixes this example.


As this is one of the very first examples developers on the learning
will read about 4.7, it seems important to make sure the code matches
best current practices.




fgm



More information about the documentation mailing list