function _signup_date_field_form_alter in Signup 5.2
Alter the form for configuring CCK date fields on node types.
Hooks into CCK Date fields to provide an option to use the current field as the Signup date field (for autoclose and reminder emails).
See also
1 call to _signup_date_field_form_alter()
- signup_form_alter in ./
signup.module - Implementation of hook_form_alter().
1 string reference to '_signup_date_field_form_alter'
- signup_form_alter in ./
signup.module - Implementation of hook_form_alter().
File
- includes/
date.inc, line 104 - Shared code required for any site using CCK date fields, regardless of the version of date in use.
Code
function _signup_date_field_form_alter($form_id, &$form) {
$type = $form['type_name']['#value'];
if (in_array($form['field_type']['#value'], array(
'date',
'datestamp',
)) && variable_get('signup_node_default_state_' . $type, 'disabled') != 'disabled') {
$form['signup'] = array(
'#type' => 'fieldset',
'#title' => t('Signup settings'),
'#collapsible' => TRUE,
'#weight' => 1,
);
$form['signup']['signup_date_field'] = _signup_date_field_element($type);
$form['#submit']['_signup_date_field_form_submit'] = array();
// Make sure the submit button comes after the signup settings fieldset.
$form['submit']['#weight'] = 50;
}
}