Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.'),
);
Comment | File | Size | Author |
---|---|---|---|
#4 | documentation-formatting_form_api_checkboxes-1360814-4.patch | 8.98 KB | Unitoch |
Comments
Comment #1
arianek CreditAttribution: arianek commentedThis is part of the API documentation, not the online documentation, so moving to the core queue. Not actually sure of the version.
Comment #2
jhodgdonActually, the Forms API reference is in the Documentation project git repository.
Comment #3
jhodgdonTagging so #1421874: [meta] Documentation Issue Queue Cleanup doesn't have to look at API docs issues.
Comment #4
Unitoch CreditAttribution: Unitoch at O8 commentedThis 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.
Comment #5
jhodgdonNot really fixing 6.x issues any more, sorry. 7.x is OK. 8.x doesn't have the file.