As posted here, I am trying change the output of an exposed filter. Currently, calculated CCK fields are shown as text field and I want a drop down.

I am trying to figure out how to write the hook_views_tables_alter function (I am very new to PHP.)

Here is a link to the site that I am working on: http://ace.pinxi.net/capabilities/framing/mouldings

And here's what I was trying:

/** Now we edit our tables for calculated fields.  **/
function mymodule_views_tables_alter(&$tables) {
  $tables['node_data_field_moulding_width_category']['filters']['field_moulding_width_category_value'] = array(
                '#type' => 'select',
                '#options' => array(
                    '***All***' => t('all widths'),
                    '3' => t('> 3'),
                    '2to3' => t('>2 <= 3'),
                    '1to2' => t('>1 <= 2'),
                    '1' => t('<= 1')
                )
                );
}

Comments

pinxi’s picture

I messed up the above link: http://drupal.org/node/156196

pinxi’s picture

Status: Active » Closed (fixed)