Form API multiple select drop downs in a paragraph I am trying to recreate the following paragraph in a custom Drupal form.


  


How do you create multiple selects in a single paragraph?
You can try a combination of wrapping the whole form in a div, so:

form['#prefix]='&lt;div class="form-wrapper"&gt;';
  $form['markup1'] = array(
    '#type' =&gt; 'markup',
    '#markup' =&gt; 'Hello this is a pulldown '
  );
  $form['pulldown1'] = array(
    '#type' =&gt; 'select',
    '#required' =&gt; TRUE,
    '#options' =&gt; array('option1', 'option2', 'option3'),
  );
  $form['markup2'] = array(
    '#type' =&gt; 'markup',
    '#markup' =&gt; ' and this is another pulldown '
  );
  $form['pulldown2'] = array(
    '#type' =&gt; 'select',
    '#required' =&gt; TRUE,
    '#options' =&gt; array('option4', 'option5', 'option6')
  );
form['#suffix]='&lt;/div&gt;';


then use theme_form_element to remove the field wrapper divs that Drupal injects automatically around each field, see this post. Once these individual divs around each pulldown are removed then the pulldowns will render inline with the markup.