How do I theme a form element? I was able to theme the form. Now I want to put a submission button into a &lt;div&gt;, but I can't theme the submission button.

This code worked for the form.

print "text text text";
print drupal_render_children($variables["form"]);


Here is the code I used to theme the submission button.

$form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Submit'),
  '#attributes' =&gt; array('style' =&gt; "padding: 0 10px;"),
  '#theme' =&gt; "submit",
);

function scores_theme($existing, $type, $theme, $path) {
  $path = drupal_get_path('module', 'scores');
  return array(
    'submit' =&gt; array(
      'render element' =&gt; 'submit',
      'template' =&gt; 'submit',
      'path' =&gt; $path,
    ),
  );
}


What should I put into submit.tpl.php? Any of these doesn't work.

print drupal_render_children($submit);

print drupal_render($variables['submit']);

print drupal_render($submit);
You should be able to wrap form elements with #prefix and #suffix:

$form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Submit'),
  '#attributes' =&gt; array('style' =&gt; "padding: 0 10px;"),
  '#theme' =&gt; "submit",
  '#prefix' =&gt; "&lt;div class='submit-button-custom'&gt;",
  '#suffix' =&gt; "&lt;/div&gt;",
);