Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2005 at 19:59 UTC
Updated:
26 Feb 2008 at 15:52 UTC
The doc for node_example_form at http://drupaldocs.org/api/head/function/node_example_form contains an example taken from contributions/docs/developer/examples/node_example.module which no longer provides proper display:
The code goes:
function node_example_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'),
// [...]
return array_merge($form, filter_form($node->format));
}
which causes the Forms API to display the input filter form on its own, without a visual container (fieldset).
Is should rather be:
function node_example_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'),
// [...]
$form['format'] = filter_form($node->format);
return $form;
}
If the doc is generated from code, the change should also be applied to contributions/docs/developer/examples/node_example.module.
(fix suggested by Morbus).
Comments
Comment #1
drewish commentedthat looks good to me, can I get an Amen before we commit it?
Comment #2
add1sun commentedAncient 4.6 code and that example code has since been changed. Closing.