You are here

function _webform_defaults_component in Webform 7.4

Same name and namespace in other branches
  1. 6.3 webform.api.php \_webform_defaults_component()
  2. 7.3 webform.api.php \_webform_defaults_component()

Specify the default properties of a component.

Return value

array An array defining the default structure of a component.

Related topics

File

./webform.api.php, line 883
Sample hooks demonstrating usage in Webform.

Code

function _webform_defaults_component() {
  return array(
    'name' => '',
    'form_key' => NULL,
    'required' => 0,
    'pid' => 0,
    'weight' => 0,
    'extra' => array(
      'options' => '',
      'questions' => '',
      'optrand' => 0,
      'qrand' => 0,
      'description' => '',
      'description_above' => FALSE,
      'private' => FALSE,
      'analysis' => TRUE,
    ),
  );
}