You are here

function _signup_date_field_element in Signup 5.2

Same name and namespace in other branches
  1. 6.2 includes/date.inc \_signup_date_field_element()
  2. 6 includes/date.inc \_signup_date_field_element()
  3. 7 includes/date.inc \_signup_date_field_element()

Create the FAPI form element for the signup date field.

Parameters

$type: The node type to generate the form element for.

Return value

FAPI form array for the signup date field element.

See also

_signup_date_field_form_alter()

_signup_date_alter_node_type_form()

2 calls to _signup_date_field_element()
_signup_date_alter_node_type_form in includes/date.inc
Alter the node type form to add a setting to select the signup date field.
_signup_date_field_form_alter in includes/date.inc
Alter the form for configuring CCK date fields on node types.

File

includes/date.inc, line 184
Shared code required for any site using CCK date fields, regardless of the version of date in use.

Code

function _signup_date_field_element($type) {
  return array(
    '#type' => 'select',
    '#title' => t('Date field to use with signup'),
    '#options' => _signup_get_date_field_options($type),
    '#default_value' => variable_get('signup_date_field_' . $type, 0),
    '#description' => t('Select the date field of this content type to use for signup time-based functionality, such as automatically closing signups when the start time has passed and sending reminder emails. Select "%none" to not use a date field for signup functionality at all.', array(
      '%none' => t('None'),
    )),
  );
}