I'm trying to modify an exposed view form by adding some additional markup. My current code looks like this:
if ($form_id == 'views_exposed_form') {
if ($form_state['view']->name == 'products_page') {
// $element = array();
$form['filter_by']['#type'] = 'item';
$form['filter_by']['#markup'] = '<h2>Filter by:</h2>';
$form['filter_by']['#weight'] = -10;
// $form = array_merge($element, $form);
$form['solution']['#options']['All'] = 'By Solution';
$form['technology']['#options']['All'] = 'By Technology';
$form['platform']['#options']['All'] = 'By Platform';
$form['brand']['#options']['All'] = 'By Brand';
$form['category']['#options']['All'] = 'By Solution';
}
dpm($form);
}
Now I'm trying to move the 'filter_by'
element to appear first, before every other element, so I attached a weight value of -10 to it. However, the element is being added to the container that the submit button would normally be found.
I'm completely confused... any insight?