Return to Snippet

Revision: 7949
at August 23, 2008 19:29 by aleprieto


Initial Code
<?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;
}
?>

Initial URL


Initial Description
Makes Drupal Advanced Search form non collapsible and expanded by default.

Initial Title
Non collapsible advanced search

Initial Tags
form, template, search, drupal

Initial Language
PHP