OK, I finally figured out how to add (or edit) form controls through the form API
in Drupal.
But now, I would like to add text to a form. Not a <textarea>
, and not a <textfield>
; both of which can be edited by the user. I would like to add <p>static text</p>
, written by me, to be read by the user.
How would one do that?
You can do this using #markup
:
$form['some_text'] = array(
'#markup' => '<p>Some text</p>'
);