function webform_form_node_type_form_alter in Webform 7.4
Implements hook_form_BASE_FORM_ID_alter().
File
- ./
webform.module, line 1930 - This module provides a simple way to create forms and questionnaires.
Code
function webform_form_node_type_form_alter(&$form, $form_state) {
if (isset($form['type'])) {
$form['webform'] = array(
'#title' => t('Webform'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
'#weight' => 10,
'#attached' => array(
'js' => array(
drupal_get_path('module', 'webform') . '/js/node-type-form.js',
),
),
);
$form['webform']['webform_node'] = array(
'#type' => 'checkbox',
'#title' => t('Enable webform functionality'),
'#description' => t('Allows a form to be attached to content. This will add tabs for "Webform" and "Results" on all content of this type.'),
'#weight' => 0,
'#default_value' => variable_get('webform_node_' . $form['#node_type']->type, FALSE),
'#attributes' => array(
'data-enabled-description' => t('Enabled'),
'data-disabled-description' => t('Disabled'),
),
);
}
}