You are here

function webform_block_save in Webform 7.4

Same name and namespace in other branches
  1. 6.3 webform.module \webform_block_save()
  2. 7.3 webform.module \webform_block_save()

Implements hook_block_save().

File

./webform.module, line 2460
This module provides a simple way to create forms and questionnaires.

Code

function webform_block_save($delta = '', $edit = array()) {

  // Load the previously defined block-specific configuration settings.
  $settings = webform_variable_get('webform_blocks');

  // Build the settings array.
  $new_settings[$delta] = array(
    'display' => $edit['display'],
    'pages_block' => $edit['pages_block'],
    'confirmation_block' => $edit['confirmation_block'],
  );

  // We store settings for multiple blocks in just one variable
  // so we merge the existing settings with the new ones before save.
  variable_set('webform_blocks', array_merge($settings, $new_settings));
}