[development] Colored text in a form

James Wilson jrguitar21 at gmail.com
Thu Apr 28 15:56:29 UTC 2011

additional HTML (that are not form elements) are typically added to the
$form array using using #prefix and/or #suffix instead of #value.

$form['#prefix'] = 'some string to appear above the form';

$form['existing-element']['#prefix'] = 'this string will appear before the
form element called existing-element';

$form['existing-element']['#suffix'] = 'this string will appear after the
form element called existing-element';

James Wilson

On Tue, Apr 26, 2011 at 4:31 PM, Carl Jester <cjester at peladon.com> wrote:

> After I posted I realized I can to a _theme function to go with the _form
> function to help lay things out nicely without having to add .tpl files or
> other theme overhead to the project. I think it's time to go make friends
> with drupal_render().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110428/8c7e58bb/attachment.html 

More information about the development mailing list