The tabs and spaces are weird. I'd fix it myself but I don't have the permissions to do it

http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....

It should look like this

$form['node_options_'. $node->type] = array(
  '#type' => 'checkboxes',
  '#title' => t('Default options'),
  '#default_value' => variable_get('node_options_'. $node->type, array('status', 'promote')),
  '#options' => array(
    'status' => t('Published'),
    'moderate' => t('In moderation queue'),
    'promote' => t('Promoted to front page'),
    'sticky' => t('Sticky at top of lists'),
    'revision' => t('Create new revision'),
  ),
  '#description' => t('Users with the <em>administer nodes</em> permission will be able to override these options.'),
);
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arianek’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Correction/Clarification » documentation

This is part of the API documentation, not the online documentation, so moving to the core queue. Not actually sure of the version.

jhodgdon’s picture

Project: Drupal core » Documentation
Version: 7.x-dev »
Component: documentation » API documentation files
Issue tags: +FAPI reference

Actually, the Forms API reference is in the Documentation project git repository.

jhodgdon’s picture

Issue tags: +valid issue

Tagging so #1421874: [meta] Documentation Issue Queue Cleanup doesn't have to look at API docs issues.

Unitoch’s picture

Title: Formating for the Form Api Checkboxes documentation is all wonky » Formatting for the Form Api Checkboxes documentation is all wonky
Issue summary: View changes
Status: Active » Needs review
FileSize
8.98 KB

This doesn't appear to be relevant for 7.x or 8.x, but only for 6.x.

Attached is a first stab at a patch. I'm not really sure where the standards come for this kind of code coloring in the FAPI doc, but I copied the html output for the snippet above and put it in the file which seems to match some of the other formatting on the Form API pages. It results in a monster line of non human-readable code. If it should be in a different format, or otherwise altered, I'd love some direction on how to format this code better so I can roll a better patch.

jhodgdon’s picture

Status: Needs review » Closed (outdated)
Issue tags: -valid issue

Not really fixing 6.x issues any more, sorry. 7.x is OK. 8.x doesn't have the file.