i have embedded a bunch of views into a node with tabs. now i want to filter those embedded views using a form. i am attempting to create a form that will be added above the tabs and will filter the views.
all of this code is placed in the input form for the body of the node. any help would be appreciated...
thanks...
ps - with the below code nothing is being rendered. if i remove the bad piece at the top the views are rendered correctly...
<?php
/* Start - code that is not working... */
function filter_form() {
$form['view-location-city'] = array(
'#type' => 'textfield',
'#title' => t('City'),
'#size' => 60,
'#default_value' => 'Paris',
'#maxlength' => 64,
'#description' => t('Filter by city),
);
$form['view-location-submit'] = array(
'#type' => 'submit',
'#value' => t('Filter'),
);
$output = drupal_get_form('filter_form', $form);
return $output;
}
/* End - code that is not working... */
/* All the below code is working beautifully */
/* ---------------------------------------------------------- */
$form = array();
$view1 = views_get_view('accommodation_view');
$view2 = views_get_view('article_view');
$view3 = views_get_view('attraction_view');
$view4 = views_get_view('event_view');
$view5 = views_get_view('nightlife_view');