Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2009 at 08:22 UTC
Updated:
9 Jul 2009 at 18:20 UTC
From http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...
"Note: if you use markup, if your content is not wrapped in tags (generally
or
If the content doesn't get wrapped, then there's nothing for attributes to apply to, surely?
The following code does nothing with the class, for example:
$form['image'] = array(
'#prefix' => '<div>',
'#value' => '<p>hello</p>',
'#suffix' => '</div>',
'#attributes' => array('class' => 'attribute-class'),
);
Comments
Comment #1
jhodgdonMarked #495202: FAPI documentation 'markup' shouldn't have '#attributes' as a duplicate of this issue.
Also, as it is still an issue in D7, it should be patched there and then ported to D6.
Comment #2
jhodgdonYou are correct about attributes. I'll be fixing this shortly, in conjunction with a host of other inconsistencies and mistakes in the FAPI doc. See
#500120: Form API doc has multiple inconsistencies
Comment #3
jhodgdonThis has now been fixed -- Commits: http://drupal.org/cvs?commit=229770 and http://drupal.org/cvs?commit=229768