Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2007 at 04:35 UTC
Updated:
11 Nov 2007 at 07:08 UTC
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
Comment #1
pinxi commentedI messed up the above link: http://drupal.org/node/156196
Comment #2
pinxi commented