You are here

function _webform_defaults_component in Webform 6.3

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

Specify the default properties of a component.

Return value

An array defining the default structure of a component.

Related topics

File

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

Code

function _webform_defaults_component() {
  return array(
    'name' => '',
    'form_key' => NULL,
    'mandatory' => 0,
    'pid' => 0,
    'weight' => 0,
    'extra' => array(
      'options' => '',
      'questions' => '',
      'optrand' => 0,
      'qrand' => 0,
      'description' => '',
    ),
  );
}