Add text after input field with form api (field-suffix) I'm creating a form with a textfield. After the input field I'd like to have some text. Like this:

Label *
|________| some text
Field description


The code I use is:

$form['a_textfield'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('A Label'),
    '#size' =&gt; 10,
    '#maxlength' =&gt; 15,
    '#description' =&gt; t('A Field description'),
    '#required' =&gt; TRUE,
);


Is there a way do add "some text" after the input field in this way? Do I have do output the HTML code manually via #markup? Is there some way to do this via form alter? Or a theming function?
You can use the #field_suffix property for exactly that:


  Text or code that is placed directly after a textfield. This can be used to add a unit to a textfield.


For example:

$form['a_textfield'] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('A Label'),
  '#size' =&gt; 10,
  '#maxlength' =&gt; 15,
  '#description' =&gt; t('A Field description'),
  '#required' =&gt; TRUE,
  '#field_suffix' =&gt; 'Suffix'
);