Index: webform_hooks.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform_hooks.php,v
retrieving revision 1.9.2.1
diff -u -r1.9.2.1 webform_hooks.php
--- webform_hooks.php	10 Mar 2010 05:21:19 -0000	1.9.2.1
+++ webform_hooks.php	11 Mar 2010 01:30:58 -0000
@@ -177,9 +177,6 @@
  *     - defaults
  *     - theme
  *     - edit
- *     - form_builder_types
- *     - form_builder_save
- *     - form_builder_preview_alter
  *     - delete
  *     - render
  *     - display
@@ -312,56 +309,6 @@
 }
 
 /**
- * Define the component to structure to hook_form_builder_types().
- */
-function _webform_form_builder_types_email() {
-  $fields = array();
-
-  $fields['email'] = array(
-    'title' => t('E-mail'),
-    'properties' => array(
-      'title',
-      'description',
-      'default_value',
-      'required',
-      'size',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New e-mail'),
-      '#type' => 'textfield',
-      '#form_builder' => array('element_type' => 'email'),
-    ),
-  );
-
-  return $fields;
-}
-
-/**
- * Convert a FAPI form element into settings savable in a component.
- *
- * @param $component
- *   The Webform component to be saved.
- * @param $form_element
- *   The form element as edited by the user through Form Builder.
- */
-function _webform_form_builder_save_component(&$component, $form_element) {
-  $component['extra']['width'] = isset($form_element['#size']) ? $form_element['#size'] : NULL;
-  $component['extra']['description'] = isset($form_element['#description']) ? $form_element['#description'] : NULL;
-  $component['extra']['disabled'] = isset($form_element['#disabled']) ? $form_element['#disabled'] : FALSE;
-}
-
-/**
- * Module specific instance of hook_form_builder_preview_alter().
- */
-function _webform_form_builder_preview_alter_hidden(&$form_element) {
-  // Make hidden fields visible while editing.
-  $form_element['#field_suffix'] = '(' . t('hidden') . ')';
-  $form_element['#autocomplete_path'] = NULL; // Needed to avoid notices.
-  $form_element['#type'] = 'textfield';
-}
-
-/**
  * Render a Webform component to be part of a form.
  *
  * @param $component
Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.196.2.2
diff -u -r1.196.2.2 webform.module
--- webform.module	8 Mar 2010 01:04:08 -0000	1.196.2.2
+++ webform.module	11 Mar 2010 01:30:58 -0000
@@ -450,10 +450,6 @@
  * Implementation of hook_init().
  */
 function webform_init() {
-  if (module_exists('form_builder') && strpos($_GET['q'], 'admin/build/form-builder') !== FALSE) {
-    module_load_include('inc', 'webform', 'includes/webform.form_builder');
-  }
-
   // Use the administrative theme if set to use on content editing pages.
   // See system_init().
   if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(2) == 'webform' || arg(2) == 'webform-results')) {
@@ -551,7 +547,7 @@
     ),
     // webform.components.inc.
     'webform_components_page' => array(
-      'arguments' => array('node' => NULL, 'mode' => NULL, 'form' => NULL),
+      'arguments' => array('node' => NULL, 'form' => NULL),
       'file' => 'includes/webform.components.inc',
     ),
     'webform_components_form' => array(
Index: components/hidden.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/hidden.inc,v
retrieving revision 1.21.2.1
diff -u -r1.21.2.1 hidden.inc
--- components/hidden.inc	3 Mar 2010 02:51:31 -0000	1.21.2.1
+++ components/hidden.inc	11 Mar 2010 01:30:59 -0000
@@ -92,40 +92,6 @@
 }
 
 /**
- * Implementation of _webform_form_builder_preview_alter_component().
- *
- * Make hidden fields visible while editing.
- */
-function _webform_form_builder_preview_alter_hidden($form_element) {
-  $form_element['#field_suffix'] = '(' . t('hidden') . ')';
-  $form_element['#autocomplete_path'] = NULL; // Needed to avoid notices.
-  $form_element['#type'] = 'textfield';
-  return $form_element;
-}
-
-/**
- * Implementation of _webform_form_builder_types_component().
- */
-function _webform_form_builder_types_hidden() {
-  $fields = array();
-
-  $fields['hidden'] = array(
-    'title' => t('Hidden'),
-    'properties' => array(
-      'title',
-      'default_value',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('Hidden field'),
-      '#type' => 'hidden',
-    ),
-  );
-
-  return $fields;
-}
-
-/**
  * Implementation of _webform_analysis_component().
  */
 function _webform_analysis_hidden($component, $sids = array()) {
Index: components/textarea.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/textarea.inc,v
retrieving revision 1.20.2.1
diff -u -r1.20.2.1 textarea.inc
--- components/textarea.inc	3 Mar 2010 02:51:31 -0000	1.20.2.1
+++ components/textarea.inc	11 Mar 2010 01:30:59 -0000
@@ -151,45 +151,6 @@
 }
 
 /**
- * Implementation of _webform_form_builder_types_component().
- */
-function _webform_form_builder_types_textarea() {
-  $fields = array();
-
-  $fields['textarea'] = array(
-    'title' => t('Textarea'),
-    'properties' => array(
-      'title',
-      'description',
-      'default_value',
-      'required',
-      'rows',
-      'cols',
-      'input_format',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New textarea'),
-      '#type' => 'textarea',
-    ),
-  );
-
-  return $fields;
-}
-
-/**
- * Implementation of _webform_form_builder_save_component().
- */
-function _webform_form_builder_save_textarea($component, $form_element) {
-  $component['extra']['description'] = $form_element['#description'];
-  $component['extra']['cols'] = $form_element['#cols'];
-  $component['extra']['rows'] = $form_element['#rows'];
-  $component['extra']['disabled'] = empty($form_element['#disabled']) ? NULL : TRUE;
-  $component['extra']['format'] = isset($form_element['#input_format']) ? $form_element['#input_format'] : NULL;
-  return $component;
-}
-
-/**
  * Implementation of _webform_analysis_component().
  */
 function _webform_analysis_textarea($component, $sids = array()) {
Index: components/fieldset.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/fieldset.inc,v
retrieving revision 1.11.2.1
diff -u -r1.11.2.1 fieldset.inc
--- components/fieldset.inc	3 Mar 2010 02:51:31 -0000	1.11.2.1
+++ components/fieldset.inc	11 Mar 2010 01:30:59 -0000
@@ -85,39 +85,3 @@
 
   return $element;
 }
-
-/**
- * Implementation of _webform_form_builder_types_component().
- */
-function _webform_form_builder_types_fieldset() {
-  $fields = array();
-
-  $fields['fieldset'] = array(
-    'title' => t('Fieldset'),
-    'properties' => array(
-      'title',
-      'description',
-      'collapsible',
-      'collapsed',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New fieldset'),
-      '#type' => 'fieldset',
-      '#collapsible' => FALSE,
-      '#collapsed' => FALSE,
-    ),
-  );
-
-  return $fields;
-}
-
-/**
- * Implementation of _webform_form_builder_save_component().
- */
-function _webform_form_builder_save_fieldset($component, $form_element) {
-  $component['extra']['collapsible'] = isset($form_element['#collapsible']) ? $form_element['#collapsible'] : NULL;
-  $component['extra']['collapsed'] = isset($form_element['#collapsed']) ? $form_element['#collapsed'] : NULL;
-  $component['extra']['description'] = isset($form_element['#description']) ? $form_element['#description'] : '';
-  return $component;
-}
Index: components/markup.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/markup.inc,v
retrieving revision 1.13.2.1
diff -u -r1.13.2.1 markup.inc
--- components/markup.inc	3 Mar 2010 02:51:31 -0000	1.13.2.1
+++ components/markup.inc	11 Mar 2010 01:30:59 -0000
@@ -70,54 +70,3 @@
 function _webform_display_markup($component, $value, $format = 'html') {
   return array();
 }
-
-/**
- * Implementation of _webform_form_builder_save_component().
- */
-function _webform_form_builder_save_markup($component, $form_element) {
-  $component['extra']['format'] = $form_element['#input_format'];
-  $component['value'] = $form_element['#markup'];
-  return $component;
-}
-
-/**
- * Module specific instance of hook_form_builder_preview_alter().
- */
-function _webform_form_builder_preview_alter_markup($form_element) {
-  $form_element['#markup'] = isset($form_element['#markup']) ? $form_element['#markup'] : '';
-  $form_element['#value'] = check_markup(_webform_filter_values($form_element['#markup'], NULL, NULL, NULL, FALSE), $form_element['#input_format'], FALSE);
-
-  if (strlen(trim($form_element['#value'])) == 0) {
-    $form_element['#value'] = t('This markup element currently does not contain any text.');
-  }
-  return $form_element;
-}
-
-/**
- * Module specific instance of hook_form_builder_types().
- */
-function _webform_form_builder_types_markup() {
-  $fields = array();
-
-  $default = '';
-  $default .= '<p><strong>' . t('New HTML Markup') . '</strong></p>' . "\n\n";
-  $default .= '<p>' . t('Enter any text supported by available input formats.') . '</p>';
-
-  $fields['markup'] = array(
-    'title' => t('Markup'),
-    'properties' => array(
-      'title',
-      'markup',
-      'input_format',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('Markup'),
-      '#type' => 'markup',
-      '#markup' => $default,
-      '#input_format' => FILTER_FORMAT_DEFAULT,
-    ),
-  );
-
-  return $fields;
-}
Index: components/select.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/select.inc,v
retrieving revision 1.39.2.3
diff -u -r1.39.2.3 select.inc
--- components/select.inc	11 Mar 2010 01:10:58 -0000	1.39.2.3
+++ components/select.inc	11 Mar 2010 01:30:59 -0000
@@ -358,105 +358,6 @@
 }
 
 /**
- * Module specific instance of hook_form_builder_types().
- */
-function _webform_form_builder_types_select() {
-  $fields = array();
-
-  $fields['select'] = array(
-    'title' => t('Select list'),
-    'properties' => array(
-      'title',
-      'description',
-      'default_value',
-      'required',
-      'options',
-      'multiple',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New select list'),
-      '#type' => 'select',
-      '#options' => array('one' => 'one', 'two' => 'two', 'three' => 'three'),
-      '#default_value' => 'one',
-      '#webform' => array('type' => 'select'),
-    ),
-  );
-
-  $fields['checkboxes'] = array(
-    'title' => t('Checkboxes'),
-    'properties' => array(
-      'title',
-      'description',
-      'default_value',
-      'required',
-      'options',
-      'multiple',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New checkboxes'),
-      '#type' => 'checkboxes',
-      '#options' => array('one' => 'one', 'two' => 'two', 'three' => 'three'),
-      '#default_value' => array('one', 'two'),
-      '#multiple' => TRUE,
-      '#webform' => array('type' => 'select'),
-    ),
-  );
-
-  $fields['radios'] = array(
-    'title' => t('Radios'),
-    'properties' => array(
-      'title',
-      'description',
-      'default_value',
-      'required',
-      'options',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New radios'),
-      '#type' => 'radios',
-      '#options' => array('one' => 'one', 'two' => 'two', 'three' => 'three'),
-      '#default_value' => 'one',
-      '#webform' => array('type' => 'select'),
-    ),
-  );
-
-  return $fields;
-}
-
-/**
- * Module specific instance of hook_form_builder_load().
- */
-function _webform_form_builder_load_select($form_element) {
-  if (in_array($form_element['#type'], array('radios', 'checkboxes', 'select'))) {
-    $form_element['#webform']['type'] = 'select';
-    if ($form_element['#type'] == 'checkboxes') {
-      $form_element['#multiple'] = TRUE;
-    }
-    return $form_element;
-  }
-}
-
-/**
- * Implementation of _webform_form_builder_save_component().
- */
-function _webform_form_builder_save_select($component, $form_element) {
-  $options = '';
-
-  foreach ($form_element['#options'] as $key => $option_value) {
-    $options .= $key . '|' . $option_value . "\n";
-  }
-
-  $component['extra']['items'] = $options;
-  $component['extra']['multiple'] = empty($form_element['#multiple']) ? 'N' : 'Y';
-  $component['extra']['aslist'] = $form_element['#type'] == 'select' ? 'Y' : 'N';
-  $component['extra']['description'] = isset($form_element['#description']) ? $form_element['#description'] : '';
-  return $component;
-}
-
-/**
  * Format the text output for this component.
  */
 function theme_webform_display_select($element) {
Index: components/textfield.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/textfield.inc,v
retrieving revision 1.21.2.1
diff -u -r1.21.2.1 textfield.inc
--- components/textfield.inc	3 Mar 2010 02:51:31 -0000	1.21.2.1
+++ components/textfield.inc	11 Mar 2010 01:30:59 -0000
@@ -180,46 +180,6 @@
 }
 
 /**
- * Implementation of _webform_form_builder_save_component().
- */
-function _webform_form_builder_save_textfield($component, $form_element) {
-  $component['extra']['width'] = isset($form_element['#size']) ? $form_element['#size'] : NULL;
-  $component['extra']['maxlength'] = isset($form_element['#maxlength']) ? $form_element['#maxlength'] : NULL;
-  $component['extra']['field_prefix'] = isset($form_element['#field_prefix']) ? $form_element['#field_prefix'] : NULL;
-  $component['extra']['field_suffix'] = isset($form_element['#field_suffix']) ? $form_element['#field_suffix'] : NULL;
-  $component['extra']['description'] = isset($form_element['#description']) ? $form_element['#description'] : NULL;
-  $component['extra']['disabled'] = isset($form_element['#disabled']) ? $form_element['#disabled'] : FALSE;
-  return $component;
-}
-
-/**
- * Implementation of _webform_form_builder_types_component().
- */
-function _webform_form_builder_types_textfield() {
-  $fields = array();
-
-  $fields['textfield'] = array(
-    'title' => t('Textfield'),
-    'properties' => array(
-      'title',
-      'description',
-      'field_prefix',
-      'field_suffix',
-      'default_value',
-      'required',
-      'size',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New textfield'),
-      '#type' => 'textfield',
-    ),
-  );
-
-  return $fields;
-}
-
-/**
  * Format the output of data for this component.
  */
 function theme_webform_display_textfield($element) {
Index: components/email.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/email.inc,v
retrieving revision 1.28.2.1
diff -u -r1.28.2.1 email.inc
--- components/email.inc	3 Mar 2010 02:51:31 -0000	1.28.2.1
+++ components/email.inc	11 Mar 2010 01:30:58 -0000
@@ -119,7 +119,6 @@
     '#suffix'        => '</div>',
     '#element_validate'  => array('_webform_validate_email'),
     '#webform_component' => $component,
-    '#form_builder'  => array('element_type' => 'email'),
   );
 
   // Enforce uniqueness.
@@ -190,42 +189,6 @@
 }
 
 /**
- * Implementation of _webform_form_builder_save_component().
- */
-function _webform_form_builder_save_email($component, $form_element) {
-  $component['extra']['width'] = isset($form_element['#size']) ? $form_element['#size'] : NULL;
-  $component['extra']['description'] = isset($form_element['#description']) ? $form_element['#description'] : NULL;
-  $component['extra']['disabled'] = isset($form_element['#disabled']) ? $form_element['#disabled'] : FALSE;
-  return $component;
-}
-
-/**
- * Implementation of _webform_form_builder_types_component().
- */
-function _webform_form_builder_types_email() {
-  $fields = array();
-
-  $fields['email'] = array(
-    'title' => t('E-mail'),
-    'properties' => array(
-      'title',
-      'description',
-      'default_value',
-      'required',
-      'size',
-      'key',
-    ),
-    'default' => array(
-      '#title' => t('New e-mail'),
-      '#type' => 'textfield',
-      '#form_builder' => array('element_type' => 'email'),
-    ),
-  );
-
-  return $fields;
-}
-
-/**
  * Implementation of _webform_analysis_component().
  */
 function _webform_analysis_email($component, $sids = array()) {
Index: includes/webform.components.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.components.inc,v
retrieving revision 1.25.2.3
diff -u -r1.25.2.3 webform.components.inc
--- includes/webform.components.inc	10 Mar 2010 03:53:10 -0000	1.25.2.3
+++ includes/webform.components.inc	11 Mar 2010 01:30:59 -0000
@@ -15,17 +15,9 @@
 /**
  * Overview page of all components for this webform.
  */
-function webform_components_page($node, $mode = 'auto', $page_number = 1) {
-  if (module_exists('form_builder') && $mode != 'overview') {
-    module_load_include('inc', 'webform', 'includes/webform.form_builder');
-    $mode = 'form_builder';
-    $output = webform_form_builder_components($node);
-  }
-  else {
-    $output = drupal_get_form('webform_components_form', $node);
-  }
-
-  return theme('webform_components_page', $node, $mode, $output);
+function webform_components_page($node) {
+  $form = drupal_get_form('webform_components_form', $node);
+  return theme('webform_components_page', $node, $form);
 }
 
 /**
@@ -34,32 +26,12 @@
  * This theming provides a way to toggle between the editing modes if Form
  * Builder module is available.
  */
-function theme_webform_components_page($node, $mode, $form) {
-  $output = '';
-
+function theme_webform_components_page($node, $form) {
   // Add CSS and JS. Don't preprocess because these files are used rarely.
   drupal_add_css(drupal_get_path('module', 'webform') . '/webform.css', 'theme', 'all', FALSE);
   drupal_add_js(drupal_get_path('module', 'webform') . '/webform.js', 'module', 'header', FALSE, TRUE, FALSE);
 
-  if (module_exists('form_builder')) {
-    $output .= '<div class="webform-components-mode">';
-    $output .= '<span class="webform-components-mode-label">' . t('Display mode') . ':</span> ';
-    if ($mode == 'overview') {
-      $output .= '<a href="' . url('node/' . $node->nid . '/webform') . '">' . t('Form builder') . '</a>';
-      $output .= ' | ';
-      $output .= '<strong>' . t('Overview') . '</strong>';
-    }
-    else {
-      $output .= '<strong>' . t('Form builder') . '</strong>';
-      $output .= ' | ';
-      $output .= '<a href="' . url('node/' . $node->nid . '/webform/overview') . '">' . t('Overview') . '</a>';
-    }
-    $output .= '</div>';
-  }
-
-  $output .= $form;
-
-  return $output;
+  return $form;
 }
 
 /**
Index: includes/webform.form_builder.inc
===================================================================
RCS file: includes/webform.form_builder.inc
diff -N includes/webform.form_builder.inc
--- includes/webform.form_builder.inc	3 Mar 2010 02:51:31 -0000	1.5.2.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,243 +0,0 @@
-<?php
-// $Id: webform.form_builder.inc,v 1.5.2.1 2010/03/03 02:51:31 quicksketch Exp $
-
-/**
- * @file
- * Form Builder integratations for Webform.
- */
-
-/**
- * Menu callback; displays the main component editing screen.
- */
-function webform_form_builder_components($node) {
-  module_load_include('inc', 'form_builder', 'includes/form_builder.admin');
-
-  $output = '';
-  $output .= form_builder_interface('webform', $node->nid);
-  $output .= drupal_get_form('webform_form_builder_save_form', $node->nid);
-
-  return $output;
-}
-
-/**
- * Form to save the Form Builder interface.
- *
- * The actual Form Builder interface is displayed as part of the
- * webform_form_builder_components() function.
- */
-function webform_form_builder_save_form(&$form_state, $nid) {
-  $form = array();
-
-  $form['nid'] = array(
-    '#type' => 'value',
-    '#value' => $nid,
-  );
-  $form['save'] = array(
-    '#type' => 'submit',
-    '#value' => t('Save'),
-  );
-  $form['cancel'] = array(
-    '#type' => 'submit',
-    '#value' => t('Cancel'),
-    '#submit' => array('webform_form_builder_cancel'),
-  );
-
-  return $form;
-}
-
-/**
- * Save the current Form Builder interface changes.
- */
-function webform_form_builder_save_form_submit($form, $form_state) {
-  $node = node_load($form_state['values']['nid']);
-  $form_cache = form_builder_cache_load('webform', $node->nid);
-  $element_ids = form_builder_preview_prepare($form_cache, 'webform', $node->nid);
-
-  // Save modified or created components.
-  foreach ($element_ids as $id) {
-    webform_form_builder_save($node, $id, $form_cache);
-  }
-
-  // Delete components that have been removed.
-  foreach ($node->webform['components'] as $component) {
-    $element_id = 'cid_' . $component['cid'];
-    if (!in_array($element_id, $element_ids)) {
-      webform_component_delete($node, $component);
-    }
-  }
-
-  drupal_set_message(t('Changes to the form have been saved.'));
-  form_builder_cache_delete('webform', $node->nid);
-}
-
-/**
- * Save the contents of a form into Webform's database tables.
- */
-function webform_form_builder_save($node, $element_id, $form) {
-  $element = form_builder_get_element($form, $element_id);
-  $type = isset($element['#webform']['type']) ? $element['#webform']['type'] : $element['#form_builder']['element_type'];
-
-  // Check for existing components.
-  $cid = substr($element_id, 4);
-  if (isset($node->webform['components'][$cid])) {
-    $component = $node->webform['components'][$cid];
-  }
-  // Populate a new default component.
-  elseif (isset($element['#webform']['is_new'])) {
-    if ($component = webform_component_invoke($type, 'defaults')) {
-      $component['type'] = $type;
-    }
-  }
-
-  // If the component type isn't found, don't try to save anything.
-  if (!isset($component)) {
-    return;
-  }
-
-  // Set typical component settings.
-  $component['name'] = $element['#title'];
-  $component['weight'] = $element['#weight'];
-  $component['form_key'] = $element['#key'];
-  $component['mandatory'] = isset($element['#required']) ? $element['#required'] : 0;
-  $component['email'] = 0;
-  $component['pid'] = isset($element['#form_builder']['parent_id']) ? substr($element['#form_builder']['parent_id'], 4) : 0;
-  $component['nid'] = $node->nid;
-
-  if (isset($element['#default_value'])) {
-    $component['value'] = is_array($element['#default_value']) ? implode(',', $element['#default_value']) : $element['#default_value'];
-  }
-
-  // Save any specific settings.
-  if ($saved_component = webform_component_invoke($type, 'form_builder_save', $component, $element)) {
-    $component = $saved_component;
-  }
-
-  if (!isset($component['cid'])) {
-    webform_component_insert($component);
-  }
-  elseif ($component != $node->webform['components'][$component['cid']]) {
-    webform_component_update($component);
-  }
-}
-
-/**
- * Submit handler for the "Cancel" button.
- */
-function webform_form_builder_cancel(&$form, &$form_state) {
-  drupal_set_message(t('Changes to the form have been discarded.'));
-  form_builder_cache_delete('webform', $form_state['values']['nid']);
-}
-
-/**
- * Implementation of hook_form_builder_types().
- *
- * Define the fields within webforms that are editable.
- */
-function webform_form_builder_types() {
-  $fields = array();
-
-  $components = webform_components();
-  foreach ($components as $type => $component) {
-    if ($additional_fields = webform_component_invoke($type, 'form_builder_types')) {
-      $fields = array_merge($fields, $additional_fields);
-    }
-  }
-
-  return array('webform' => $fields);
-}
-
-
-/**
- * Implementation of hook_form_builder_properties().
- */
-function webform_form_builder_properties($form_type) {
-  $properties = array();
-
-  if ($form_type == 'webform') {
-    $components = webform_components();
-    foreach ($components as $type => $component) {
-      if ($additional_properties = webform_component_invoke($type, 'form_builder_properties')) {
-        $properties = array_merge($properties, $additional_properties);
-      }
-    }
-  }
-
-  return $properties;
-}
-
-/**
- * Implementation of hook_form_builder_load().
- *
- * Load a complete FAPI array based on a form type and ID.
- */
-function webform_form_builder_load($form_builder_type, $form_builder_id) {
-  if ($form_builder_type == 'webform') {
-    // Webform identifies its forms by Node Id.
-    $nid = $form_builder_id;
-    $node = node_load($nid);
-    // Get the unfiltered version of the client form.
-    $form_state = array();
-    $form = webform_client_form($form_state, $node, array(), TRUE, FALSE, FALSE);
-    webform_form_builder_load_process($form['submitted'], $node);
-    return $form['submitted'];
-  }
-}
-
-/**
- * Recursive helper function to populate #form_builder['element_id'] values.
- */
-function webform_form_builder_load_process(&$form, $node, $pid = 0) {
-    foreach (element_children($form) as $key) {
-      $cid = webform_get_cid($node, $key, $pid);
-      $form[$key]['#form_builder'] = array(
-        'element_id' => 'cid_' . $cid,
-      );
-
-      // Add any component-specific loading. Note that all components are
-      // invoked here because the component type isn't yet known.
-      foreach (webform_components() as $type => $info) {
-        if ($element = webform_component_invoke($type, 'form_builder_load', $form[$key])) {
-          $form[$key] = $element;
-        }
-      }
-      webform_form_builder_load_process($form[$key], $node, $cid);
-    }
-}
-
-/**
- * Implementation of hook_form_builder_add_element_alter().
- *
- * Modify a FAPI element before it is added to the form array.
- */
-function webform_form_builder_add_element_alter(&$element, $form_type, $form_id) {
-  if ($form_type == 'webform') {
-    $element['#webform']['is_new'] = TRUE;
-  }
-}
-
-/**
- * Implementation of hook_form_builder_preview_alter().
- *
- * The most common use of the preview altering is filtering field descriptions
- * via filter_xss() or other functions. Webform has it's own filtering function
- * for this purpose.
- */
-function webform_form_builder_preview_alter(&$element, $form_type, $form_id) {
-  if ($form_type == 'webform') {
-    // Filter all descriptions for all components.
-    if (isset($element['#description'])) {
-      $element['#description'] = _webform_filter_descriptions($element['#description'], NULL, NULL, FALSE);
-    }
-
-    if (isset($element['#default_value']) && is_string($element['#default_value'])) {
-      $element['#value'] = _webform_filter_values($element['#default_value'], NULL, NULL, NULL, FALSE);
-    }
-
-    // Let components do any extra filtering if needed.
-    $type = isset($element['#webform']['type']) ? $element['#webform']['type'] : $element['#form_builder']['element_type'];
-    $function = '_webform_form_builder_preview_alter_' . $type;
-    if ($new_element = webform_component_invoke($type, 'form_builder_preview_alter', $element)) {
-      $element = $new_element;
-    }
-  }
-}
