function hosting_site_data_form_alter in Hosting 7.3
Same name and namespace in other branches
- 6.2 example/site_data/hosting_site_data.module \hosting_site_data_form_alter()
- 7.4 example/site_data/hosting_site_data.module \hosting_site_data_form_alter()
Implements hook_form_alter().
File
- example/
site_data/ hosting_site_data.module, line 10 - The hosting site data example.
Code
function hosting_site_data_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'site_node_form') {
$form['site_data'] = array(
'#type' => 'fieldset',
'#title' => t('Site data example'),
'#description' => t('Example implementation of saving data into the site context.'),
);
$form['site_data']['site_data'] = array(
'#type' => 'textfield',
'#title' => t('Site data'),
'#default_value' => isset($form['#node']->site_data) ? $form['#node']->site_data : '',
'#weight' => 0,
);
return $form;
}
}