Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2009 at 22:51 UTC
Updated:
1 Dec 2009 at 21:35 UTC
Hi All - using hook_form_alter I can render my select-list fields as checkboxes when using exposed filters. However, the searching functionality no longer works. All Select-lists I ask to be rendered as checkboxes do so, and appear as I wish. However, after selecting a search criteria and hitting Apply, nothing happens (the URL does not change either - I am not updating via AJAX).
I have my view rendered as a page output. When I render the filters as select lists, the view I have created renders properly on my form (at /home). When I change the widgets to checkboxes, /home only shows the selection options, but no output.
Below is my module
<?php
function exposedviewsformalter_form_alter(&$form, $form_state, $form_id) {
if($form['#id'] == 'views-exposed-form-v-search-specials-page-1') {
$form['where']['#type'] = 'checkboxes';
}
}
Comments
Comment #1
merlinofchaos commentedI do not support changing widgets to checkboxes, as checkboxes do not work well in exposed filters.
Comment #2
flying_q commentedThanks merlin....after posting that I realized I had not done enough research on the topic. Made my data structure much more taxonomy based and things are working like a dream.