[documentation] [bug] Error in Forms API Quick Start Guide
webchick
drupal-docs at drupal.org
Mon Mar 20 01:58: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: webchick
Status: patch (code needs review)
Hm. Really? $edit['foo'] and 'foo' are not the same thing. One is saying
"The $foo variable that was submitted with the form" the other is saying
"Make it literally the word 'foo'."
I'll talk to chx about this next time I see him to see if he can
clarify this.
webchick
Previous comments:
------------------------------------------------------------------------
Sun, 19 Mar 2006 22:01:26 +0000 : fgm
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.
More information about the documentation
mailing list