You are here

function webform_components_form_add_submit in Webform 6.3

Same name and namespace in other branches
  1. 7.4 includes/webform.components.inc \webform_components_form_add_submit()
  2. 7.3 includes/webform.components.inc \webform_components_form_add_submit()

Submit handler for webform_components_form() that adds a new component.

1 string reference to 'webform_components_form_add_submit'
webform_components_form in includes/webform.components.inc
The table-based listing of all components for this webform.

File

includes/webform.components.inc, line 335
Webform module component handling.

Code

function webform_components_form_add_submit($form, &$form_state) {
  $node = node_load($form_state['values']['nid']);
  $component = $form_state['values']['add'];
  $form_state['redirect'] = array(
    'node/' . $node->nid . '/webform/components/new/' . $component['type'],
    array(
      'name' => $component['name'],
      'mandatory' => $component['mandatory'],
      'pid' => $component['pid'],
      'weight' => $component['weight'],
    ),
  );
}