function hook_domain_form in Domain Access 7.3
Allows other modules to add elements to the default Domain settings page.
Parameters
&$form: The $form array generated for the Domain settings page. This must be passed by reference. Normally, you should include your form elements inside a new fieldset.
Return value
No return value. The $form is modified by reference, as needed.
2 functions implement hook_domain_form()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_settings_domain_form in domain_settings/
domain_settings.module - Implements hook_domain_form().
- domain_theme_domain_form in domain_theme/
domain_theme.module - Implements hook_domain_form()
1 invocation of hook_domain_form()
- domain_configure_form in ./
domain.admin.inc - FormsAPI for configuring the domain module.
File
- ./
domain.api.php, line 196 - API documentation file.
Code
function hook_domain_form(&$form) {
// Add the form element to the main screen.
$form['domain_mymodule'] = array(
'#type' => 'fieldset',
'#title' => t('Mymodule settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$options = drupal_map_assoc(array(
-100,
-25,
-10,
-5,
-1,
0,
1,
5,
10,
25,
100,
));
$form['domain_mymodule']['domain_mymodule'] = array(
'#type' => 'select',
'#title' => t('Mymodule settings variable'),
'#options' => $options,
'#default_value' => variable_get('domain_mymodule', 0),
'#description' => t('You description goes here.'),
);
}