You are here

function webform_node_defaults in Webform 6.3

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

Default settings for a newly created webform node.

4 calls to webform_node_defaults()
webform_check_record in ./webform.module
Utility function to check if a webform record is necessary in the database.
webform_node_insert in ./webform.module
Implements hook_node_insert().
webform_node_load in ./webform.module
Implements hook_node_load().
webform_node_prepare in ./webform.module
Implements hook_node_prepare().

File

./webform.module, line 1149

Code

function webform_node_defaults() {
  $defaults = array(
    'confirmation' => '',
    'confirmation_format' => (string) filter_resolve_format(FILTER_FORMAT_DEFAULT),
    'redirect_url' => '<confirmation>',
    'teaser' => '0',
    'block' => '0',
    'allow_draft' => '0',
    'auto_save' => '0',
    'submit_notice' => '1',
    'submit_text' => '',
    'submit_limit' => '-1',
    'submit_interval' => '-1',
    'total_submit_limit' => '-1',
    'total_submit_interval' => '-1',
    'status' => '1',
    'record_exists' => FALSE,
    'roles' => array(
      '1',
      '2',
    ),
    'emails' => array(),
    'components' => array(),
  );
  drupal_alter('webform_node_defaults', $defaults);
  return $defaults;
}