[documentation] [Documentation task] Update API documentation for forms api #type => item

Jax drupal-docs at drupal.org
Mon Oct 9 18:30:11 UTC 2006


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

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     tasks
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Jax
 Updated by:   Jax
-Status:       fixed
+Status:       active

Even if it's just something like: "Since it doesn't exist, the default
type 'markup' is used."
I saw it in the code, wanted to know what it does, checked the docs,
found nothing. So just the sentence above would already be helpful.


And I would like to know which attributes it supports, because I'm
under the impression that it doesn't take #attributes.




Jax



Previous comments:
------------------------------------------------------------------------

Mon, 09 Oct 2006 18:07:38 +0000 : Jax

There is no mention of the 'item' type in the forms api documentation:
http://api.drupal.org/api/4.7/file/developer/topics/forms_api_reference....


It's missing from the HEAD docs too.




------------------------------------------------------------------------

Mon, 09 Oct 2006 18:15:16 +0000 : RobRoy

I just noticed '#type' => 'item' is used in the forward.module. AFAIK
there is no 'item' FAPI type. Since it doesn't exist, the default type
'markup' is used.




------------------------------------------------------------------------

Mon, 09 Oct 2006 18:27:35 +0000 : Jax

It's also used in the image_attach module and a lot of core modules:
$ grep "type' => 'item'" *.module
comment.module:      $form['_author'] = array('#type' => 'item',
'#title' => t('Your name'), '#value' => theme('username', $user)
contact.module:      $form['from'] = array('#type' => 'item',
contact.module:      $form['to'] = array('#type' => 'item',
menu.module:      $form['menu']['advanced'] = array('#type' => 'item',
menu.module:  $form['settings_links']['intro'] = array('#type' =>
'item',
menu.module:  $form['settings_authoring']['intro'] = array('#type' =>
'item',
menu.module:    $form['_path'] = array('#type' => 'item',
search.module:  $form['basic'] = array('#type' => 'item', '#title' =>
$prompt);
system.module:        $form['themes'][$info->key]['description'] =
array('#type' => 'item', '#title' => $info->name,  '#value' =>
dirname($info->filename) . ($info->name == variable_get('theme_default',
'bluemarine') ? t('<br /> <em>(site default theme)</em>') : ''));
system.module:  $form['settings'] = array('#type' => 'item', '#value'
=> $status);
system.module:    $form[$info->name]['description'] = array('#type' =>
'item', '#title' => $info->name,  '#value' => dirname($info->filename));


Since it is used in so many places I think the docs should at least
mention something about it...






More information about the documentation mailing list