I’d like to print Drupal’s advanced node search form (the one that appears on search/node) in a template–let’s say page.tpl.php for example.
This gets me the basic search box (without the “Advanced search” fieldset):
<?php
print drupal_get_form('search_form');
?>
However, the advanced search form’s $form_id is also ‘search_form’. The “advanced search” fieldset on search/node appears to be created by node_form_alter() in node.module, starting at line 1849. Is it possible to force drupal_get_form() to retrieve the version of the search_form that gets altered by node_form_alter()? Or should I approach this another way entirely?
You could try creating your own form and using the node form.
Something like:
function my_form(..) {
$form = search_form(..);
return $form;
}
For the arguments I left out, see:
http://api.drupal.org/api/drupal/modules–search–search.module/function/search_form/6