You are here

function views_handler_filter_profile_date_value_form in Views (for Drupal 7) 5

Drupal builtin date type does not allow to not have a value, hence build custom date field here

1 call to views_handler_filter_profile_date_value_form()
profile_views_add_filter in modules/views_profile.inc
Add profile filters to view table

File

modules/views_profile.inc, line 423

Code

function views_handler_filter_profile_date_value_form() {
  $form['#tree'] = true;
  $form['day'] = array(
    '#prefix' => '<div class="container-inline">',
    '#type' => 'select',
    '#options' => array(
      '0' => '--',
    ) + drupal_map_assoc(range(1, 31)),
  );
  $form['month'] = array(
    '#type' => 'select',
    '#options' => array(
      '0' => '--',
    ) + drupal_map_assoc(range(1, 12), 'map_month'),
  );
  $form['year'] = array(
    '#type' => 'select',
    '#options' => array(
      '0' => '--',
    ) + drupal_map_assoc(range(2006, 2050)),
    '#suffix' => '</div>',
  );
  $form['#after_build'] = array(
    'views_handler_filter_profile_after_build',
  );
  return $form;
}