diff --git a/includes/webform.components.inc b/includes/webform.components.inc
index e1faacc..6c10ccf 100644
--- a/includes/webform.components.inc
+++ b/includes/webform.components.inc
@@ -144,14 +144,9 @@ function webform_components_form($form, $form_state, $node) {
 }
 
 /**
- * Theme the node components form. Use a table to organize the components.
- *
- * @param $form
- *   The form array.
- * @return
- *   Formatted HTML form, ready for display.
+ * Preprocess variables for theming the webform components form.
  */
-function theme_webform_components_form($variables) {
+function template_preprocess_webform_components_form(&$variables) {
   $form = $variables['form'];
 
   $form['components']['#attached']['library'][] = array('webform', 'admin');
@@ -260,9 +255,21 @@ function theme_webform_components_form($variables) {
     $rows[] = $add_form;
   }
 
+  $variables['rows'] = $rows;
+  $variables['header'] = $header;
+  $variables['element'] = $form;
+}
+
+/**
+ * Theme the node components form. Use a table to organize the components.
+ *
+ * @return
+ *   Formatted HTML form, ready for display.
+ */
+function theme_webform_components_form($variables) {
   $output = '';
-  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'webform-components')));
-  $output .= drupal_render_children($form);
+  $output .= theme('table', array('header' => $variables['header'], 'rows' => $variables['rows'], 'attributes' => array('id' => 'webform-components')));
+  $output .= drupal_render_children($variables['element']);
   return $output;
 }
 
