Hello Gurus,
I'm creating a custom theme and need to heavily alter the search block form. I've done a lot of digging before posting here, and so far I can call a function that will wrap my form a bit differently (
...
to
...
).
The challenge is that my custom function is returning an empty string or isn't being accepted or is behaving badly in general. I could simply return "HELLO" and nothing will show on the site. I know that my function is being called and I can print_r() the $variables. I just don't see what is being returned there.
/**
* hook_theme()
*/
function ss30_theme($existing, $type, $theme, $path) {
return array(
'ss30_search_block_form' => array(
'variables' => array('links' => array(), 'attributes' => array(), 'type' => NULL),
),
);
}
/**
* hook_form_alter()
*/
//alter forms
function ss30_form_alter(&$form, &$form_state, $form_id) {
if($form_id == 'search_block_form') {
$form['#theme_wrappers'] = array(0 => 'ss30_search_block_form');
}
}
//get rid of the extra
right after the start and end of
//taken from: https://api.drupal.org/api/drupal/includes!form.inc/function/theme_form/7
function ss30_search_block_form($variables) {
//die('made it this far...');
$element = $variables['element'];
if (isset($element['#action'])) {