Hi,

I am writing my own module which contains a multi-step form.

I created a fieldset with two buttons. The buttons are standing side-by-side, but I want them above each other. How can I do this?
Do you have any suggestions?

Comments

jan.stoeckler’s picture

I would try some CSS. Maybe let both buttons (or some surrounding container elements) float left, and apply a "clear: left" to the second button to move it down beneath.

jaypan’s picture

What stoekler said is probably the best way, but if that's not working for you, you can also wrap the submit buttons in a div, which will force a second line.

$form['submit'] = array
(
  '#prefix' => '<div>',
  '#type' => 'submit',
  '#value' => t('Submit'),
  '#suffix' => '</div>',
);

Contact me to contract me for D7 -> D10/11 migrations.