function hosting_alias_form_alter in Hosting 5
Same name and namespace in other branches
- 6.2 alias/hosting_alias.module \hosting_alias_form_alter()
Implementation of hook_form_alter
Add a textbox to site node forms with a newline separated list of aliases to the site
File
- alias/
hosting_alias.module, line 39
Code
function hosting_alias_form_alter($form_id, &$form) {
if (user_access('create site aliases')) {
if ($form_id == 'site_node_form') {
$form['aliases'] = array(
'#type' => 'textarea',
'#title' => t('Domain aliases'),
'#description' => t('Your site can also be accessed through these domain names. This field requires each domain to be alias to be on it\'s own line'),
'#default_value' => implode("\n", (array) $form['#node']->aliases),
);
}
}
}