/ Published in: PHP

Makes Drupal Advanced Search form non collapsible and expanded by default.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /** * Theme override for search form. * * Replace themename with your theme's name. */ function themename_search_form($form) { $output = ''; // Print out the $form array to see all the elements we are working with. //$output .= dsm($form); // Once I know which part of the array I'm after we can change it. // You can use the normal Form API structure to change things, like so: // Change the advanced search field to non collapsible. $form['advanced']['#collapsible'] = 0; // Make sure you call a drupal_render() on the entire $form to make sure you // still output all of the elements (particularly hidden ones needed // for the form to function properly.) $output .= drupal_render($form); return $output; } ?>
Comments
