[development] Re: [drupal-devel] Forms API documentation update

Syscrusher scott at 4th.com
Fri Nov 11 14:30:47 UTC 2005


On Friday 11 November 2005 01:26, Angie Byron wrote:
> Tonight, Kieran, Károly, and I worked on http://drupal.org/node/37194 which
> presents a flowchart and code example comparing the "old" forms API with the new
> one, for those who are more "visual" in their learning approach. Hopefully this
> will prove valuable for people who are struggling a bit with the "bigger picture."

Nicely done, and very helpful!

> * Forms API FAQ: http://drupal.org/node/36899

I have two concerns about this page. First, in one of the code snippets (inline),
I think you have an "=" where you need "=>" for an associative array declaration.
Also, you used some standalone constants (implied string constants, that is,
strings without quotes), which might be syntactically valid, but which IMO are
a little harder to read than putting those constants into quotes.

Second, there is a paragraph that states that taxonomy forms no longer require
any code in the application. That may be true for the simple case of a module
that creates a custom node type, but it is emphatically not true in the general
case of all modules. I've already ported one module that requires a taxonomy
form, but where the module does not implement the node API. I can supply a
code example of how I did it, if that would help. (I actually think I may have
already sent my example to someone on the docs team, but maybe not.)

There are a few cases where one needs a taxonomy form to select terms from
a vocabulary or vocabularies, but where the module that needs the form is not
the same as the module that defines the node type(s) in question. My image_import
module is one such case. I could envision an "advanced search" type of module,
or perhaps some kind of taxonomy/node statistical module, that would also
encounter this situation.

Kind regards, and thanks for your work so far. I intend the above to be
constructive suggestions, not empty criticism, and I am willing to do what I
can to contribute to the solution rather than just pointing out the problems.
If I can be of assistance in doing so, please let me know.

Kind regards,

Scott

-- 
-------------------------------------------------------------------------------
Scott Courtney     Drupal user name: "syscrusher"   http://drupal.org/user/9184
scott at 4th dot com       Drupal projects: http://drupal.org/project/user/9184
Sandbox:  http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/syscrusher


More information about the development mailing list